|
@@ -174,6 +174,7 @@ public class YZTLayer : YZTRootLayer
|
|
|
{
|
|
|
clearBtn.GetComponent<Image>().sprite = sprites[1];
|
|
|
leftContent.gameObject.SetActive(false);
|
|
|
+ pointParent.gameObject.SetActive(false);
|
|
|
middleContent.gameObject.SetActive(false);
|
|
|
rightContent.gameObject.SetActive(false);
|
|
|
clearBtn.GetComponent<RectTransform>().anchoredPosition = new Vector2(-827, clearBtn.GetComponent<RectTransform>().anchoredPosition.y);
|
|
@@ -181,6 +182,7 @@ public class YZTLayer : YZTRootLayer
|
|
|
else {
|
|
|
clearBtn.GetComponent<Image>().sprite = sprites[0];
|
|
|
leftContent.gameObject.SetActive(true);
|
|
|
+ pointParent.gameObject.SetActive(true);
|
|
|
middleContent.gameObject.SetActive(true);
|
|
|
rightContent.gameObject.SetActive(true);
|
|
|
clearBtn.GetComponent<RectTransform>().anchoredPosition = new Vector2(-457, clearBtn.GetComponent<RectTransform>().anchoredPosition.y);
|
|
@@ -394,6 +396,8 @@ public class YZTLayer : YZTRootLayer
|
|
|
StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
|
|
|
yZT.gameObject.SetActive(true);
|
|
|
ChangeRightContent(tempJ);
|
|
|
+ pointParent.gameObject.SetActive(false);
|
|
|
+ clearBtn.gameObject.SetActive(false);
|
|
|
middleContent.gameObject.SetActive(false);
|
|
|
rightContent.gameObject.SetActive(false);
|
|
|
LeftBtnClick(1, false);
|
|
@@ -420,6 +424,8 @@ public class YZTLayer : YZTRootLayer
|
|
|
StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].name_pri);
|
|
|
yZT.gameObject.SetActive(true);
|
|
|
ChangeRightContent(tempJ);
|
|
|
+ pointParent.gameObject.SetActive(false);
|
|
|
+ clearBtn.gameObject.SetActive(false);
|
|
|
middleContent.gameObject.SetActive(false);
|
|
|
rightContent.gameObject.SetActive(false);
|
|
|
LeftBtnClick(1, false);
|
|
@@ -519,43 +525,14 @@ public class YZTLayer : YZTRootLayer
|
|
|
newPoint.bingObj.transform.localPosition = tempLocalPosition;
|
|
|
newPoint.bingObj.name = temp.name;
|
|
|
|
|
|
- newPoint.onChildClick += OnChooseNewPointClick;
|
|
|
-
|
|
|
newPoint.onPointClick = () =>
|
|
|
{
|
|
|
- OnChooseNewPointClick(temp, newPoint);
|
|
|
+ OnNewPointClick(temp, newPoint);
|
|
|
};
|
|
|
runtimePointLib.Add(newPoint);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- void OnChooseNewPointClick(int selectIndex, RuntimePoint newPoint) {
|
|
|
- if (selectIndex == 0 || selectIndex == 3 || selectIndex == 5)
|
|
|
- {
|
|
|
- OnePicNav.instance.OnButtnClick(2);
|
|
|
- }
|
|
|
- else if (selectIndex == 1 || selectIndex == 2)
|
|
|
- {
|
|
|
- OnePicNav.instance.SwitchToGlobalWeather();
|
|
|
- }
|
|
|
- else if (selectIndex == 4)
|
|
|
- {
|
|
|
- OnePicNav.instance.SwitchToGlobalWaterHeight();
|
|
|
- }
|
|
|
- else if (selectIndex >= 6)
|
|
|
- {
|
|
|
- CameraManager.SwitchCamera(0);
|
|
|
- viewMode = ViewMode.normal;
|
|
|
- StaticLod.instance.OnFoucusStatic(newPoint.staticImp);
|
|
|
- yZT.gameObject.SetActive(true);
|
|
|
- int index = FindIndexByLayerUnitName(newPoint.bingObj.gameObject.name);
|
|
|
- ChangeRightContent(index);
|
|
|
- middleContent.gameObject.SetActive(false);
|
|
|
- rightContent.gameObject.SetActive(false);
|
|
|
- LeftBtnClick(1, false);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
int FindIndexByLayerUnitName(string name) {
|
|
|
for (int i = 0; i < GlobalData.layerUnitDatas.Count; i++) {
|
|
|
if (GlobalData.layerUnitDatas[i].name == name.Trim()) {
|
|
@@ -565,33 +542,24 @@ public class YZTLayer : YZTRootLayer
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
- void OnChooseNewPointClick(HotPointData temp, RuntimePoint newPoint) {
|
|
|
- if (newPoint.layerIDs.Count < 2)
|
|
|
- {
|
|
|
- OnNewPointClick(temp, newPoint);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
void OnNewPointClick(HotPointData temp, RuntimePoint newPoint)
|
|
|
{
|
|
|
- if ((int)temp.type == 0 || (int)temp.type == 3 || (int)temp.type == 5) {
|
|
|
- OnePicNav.instance.OnButtnClick(2);
|
|
|
- }
|
|
|
- else if ((int)temp.type == 1 || (int)temp.type == 2) {
|
|
|
- OnePicNav.instance.SwitchToGlobalWeather();
|
|
|
- }
|
|
|
- else if ((int)temp.type == 4)
|
|
|
+ if ((int)temp.type == 4)
|
|
|
{
|
|
|
OnePicNav.instance.SwitchToGlobalWaterHeight();
|
|
|
}
|
|
|
- else if ((int)temp.type >= 6)
|
|
|
+ else if ((int)temp.type >= 6 || newPoint.layerIDs.Count > 4)
|
|
|
{
|
|
|
+ Debug.Log(1111111111111);
|
|
|
CameraManager.SwitchCamera(0);
|
|
|
viewMode = ViewMode.normal;
|
|
|
StaticLod.instance.OnFoucusStatic(newPoint.staticImp);
|
|
|
yZT.gameObject.SetActive(true);
|
|
|
int index = FindIndexByLayerUnitName(temp.name);
|
|
|
ChangeRightContent(index);
|
|
|
+ pointParent.gameObject.SetActive(false);
|
|
|
+ clearBtn.gameObject.SetActive(false);
|
|
|
middleContent.gameObject.SetActive(false);
|
|
|
rightContent.gameObject.SetActive(false);
|
|
|
LeftBtnClick(1, false);
|
|
@@ -614,6 +582,8 @@ public class YZTLayer : YZTRootLayer
|
|
|
|
|
|
void Init() {
|
|
|
yZT.gameObject.SetActive(false);
|
|
|
+ clearBtn.gameObject.SetActive(true);
|
|
|
+ pointParent.gameObject.SetActive(true);
|
|
|
middleContent.gameObject.SetActive(true);
|
|
|
rightContent.gameObject.SetActive(true);
|
|
|
LeftBtnClick(currentActiveLeft);
|
|
@@ -688,6 +658,8 @@ public class YZTLayer : YZTRootLayer
|
|
|
int index = StaticLod.instance.OnFoucusStatic(si);
|
|
|
yZT.gameObject.SetActive(true);
|
|
|
ChangeRightContent(index);
|
|
|
+ pointParent.gameObject.SetActive(false);
|
|
|
+ clearBtn.gameObject.SetActive(false);
|
|
|
middleContent.gameObject.SetActive(false);
|
|
|
rightContent.gameObject.SetActive(false);
|
|
|
LeftBtnClick(1,false);
|