From f0ab0ddbc2633f5d8ebc96ed07de1bb2986e2e5d Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 27 九月 2019 23:02:32 +0800
Subject: [PATCH] 0312 1. 小地图改成常显 需测试副本(联赛)和跨服显示 2. 切换时 首充改成左右移动 3. 优化小地图箭头坐标 4. 优化界面关闭时 依然显示功能模式,切换副本立即显示为副本图标
---
System/MainInterfacePanel/TopRightTip.cs | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/System/MainInterfacePanel/TopRightTip.cs b/System/MainInterfacePanel/TopRightTip.cs
index 21a064d..591373c 100644
--- a/System/MainInterfacePanel/TopRightTip.cs
+++ b/System/MainInterfacePanel/TopRightTip.cs
@@ -91,18 +91,25 @@
var mapHeight = mapResConfig.MapScale.y;
var uiMapWidth = mapWidth * mapResConfig.MapShowScale;
var uiMapHeight = mapHeight * mapResConfig.MapShowScale;
+ m_MapName.text = mapResConfig.Name;
this.mapMatrix = new LocalMap(this.dataMapId, mapWidth, mapHeight, uiMapWidth, uiMapHeight);
-
m_MapImage.SetSprite(mapResConfig.BigMap);
m_MapImage.SetNativeSize();
- var hPos = mapMatrix.WorldToLocalPosition(PlayerDatas.Instance.hero.Pos);
- heroPrePosition = hPos;
- m_MapName.text = mapResConfig.Name;
+
+ if (mapWidth == 0)
+ {
+ heroPrePosition = Vector3.zero;
+ }
+ else
+ {
+ var hPos = mapMatrix.WorldToLocalPosition(PlayerDatas.Instance.hero.Pos);
+ heroPrePosition = hPos;
+ }
}
//鏇存柊鍧愭爣
- if (dataMapId == PlayerDatas.Instance.baseData.MapID && PlayerDatas.Instance.hero.IsRun())
+ if (heroPrePosition != Vector3.zero && dataMapId == PlayerDatas.Instance.baseData.MapID && PlayerDatas.Instance.hero.IsRun())
{
var heroPos = mapMatrix.WorldToLocalPosition(PlayerDatas.Instance.hero.Pos);
if (Vector3.Distance(heroPrePosition, heroPos) > 1f)
@@ -115,9 +122,8 @@
m_MapHero.transform.eulerAngles = _mapHeroEular;
}
}
- if (m_MapImage.transform.localPosition != heroPrePosition)
+ if (heroPrePosition != Vector3.zero)
m_MapImage.transform.localPosition = heroPrePosition;
-
}
@@ -147,6 +153,11 @@
}
}
+
+ public void ShowMiniMap(bool show)
+ {
+ m_Map.gameObject.SetActive(show);
+ }
}
}
--
Gitblit v1.8.0