|
@@ -792,15 +792,18 @@ public class YZTLayer : YZTRootLayer
|
|
if ((int)tempDatas[j].type == layerDatas[i].layerID)
|
|
if ((int)tempDatas[j].type == layerDatas[i].layerID)
|
|
{
|
|
{
|
|
int tempJ = j;
|
|
int tempJ = j;
|
|
|
|
+
|
|
SecLayerBtn secLayerBtn = Instantiate(secLayerBtnPrefab);
|
|
SecLayerBtn secLayerBtn = Instantiate(secLayerBtnPrefab);
|
|
secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
secLayerBtn.btn.onClick.AddListener(() =>
|
|
secLayerBtn.btn.onClick.AddListener(() =>
|
|
{
|
|
{
|
|
|
|
+
|
|
CameraManager.SwitchCamera(0);
|
|
CameraManager.SwitchCamera(0);
|
|
viewMode = ViewMode.normal;
|
|
viewMode = ViewMode.normal;
|
|
StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
yZT.gameObject.SetActive(true);
|
|
yZT.gameObject.SetActive(true);
|
|
|
|
+
|
|
ChangeRightContent(tempJ);
|
|
ChangeRightContent(tempJ);
|
|
pointParent.gameObject.SetActive(false);
|
|
pointParent.gameObject.SetActive(false);
|
|
clearBtn.gameObject.SetActive(false);
|
|
clearBtn.gameObject.SetActive(false);
|
|
@@ -836,22 +839,28 @@ public class YZTLayer : YZTRootLayer
|
|
|
|
|
|
void ChangeRightContent(int index)
|
|
void ChangeRightContent(int index)
|
|
{
|
|
{
|
|
|
|
+ int newIndex = index;
|
|
|
|
+ if (newIndex > 120)
|
|
|
|
+ {
|
|
|
|
+ newIndex = newIndex - 58;
|
|
|
|
+ }
|
|
|
|
+
|
|
for (int i = 0; i < infoRight.childCount; i++)
|
|
for (int i = 0; i < infoRight.childCount; i++)
|
|
{
|
|
{
|
|
infoRight.GetChild(i).gameObject.SetActive(false);
|
|
infoRight.GetChild(i).gameObject.SetActive(false);
|
|
}
|
|
}
|
|
- infoRight.GetChild(index).gameObject.SetActive(true);
|
|
|
|
|
|
+ infoRight.GetChild(newIndex).gameObject.SetActive(true);
|
|
|
|
|
|
GameObject title;
|
|
GameObject title;
|
|
GameObject text1;
|
|
GameObject text1;
|
|
- if (infoRight.GetChild(index).GetComponentInChildren<ScrollRect>() != null)
|
|
|
|
|
|
+ if (infoRight.GetChild(newIndex).GetComponentInChildren<ScrollRect>() != null)
|
|
{
|
|
{
|
|
- title = infoRight.GetChild(index).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(1).gameObject;
|
|
|
|
- text1 = infoRight.GetChild(index).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(2).gameObject;
|
|
|
|
|
|
+ title = infoRight.GetChild(newIndex).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(1).gameObject;
|
|
|
|
+ text1 = infoRight.GetChild(newIndex).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(2).gameObject;
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- title = infoRight.GetChild(index).GetChild(0).GetChild(1).gameObject;
|
|
|
|
- text1 = infoRight.GetChild(index).GetChild(0).GetChild(2).gameObject;
|
|
|
|
|
|
+ title = infoRight.GetChild(newIndex).GetChild(0).GetChild(1).gameObject;
|
|
|
|
+ text1 = infoRight.GetChild(newIndex).GetChild(0).GetChild(2).gameObject;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -864,9 +873,9 @@ public class YZTLayer : YZTRootLayer
|
|
{
|
|
{
|
|
text1.GetComponent<Text>().text = GlobalData.layerUnitDatas[index].text1;
|
|
text1.GetComponent<Text>().text = GlobalData.layerUnitDatas[index].text1;
|
|
}
|
|
}
|
|
- if (infoRight.GetChild(index).GetChild(0).childCount > 3)
|
|
|
|
|
|
+ if (infoRight.GetChild(newIndex).GetChild(0).childCount > 3)
|
|
{
|
|
{
|
|
- GameObject text2 = infoRight.GetChild(index).GetChild(0).GetChild(3).gameObject;
|
|
|
|
|
|
+ GameObject text2 = infoRight.GetChild(newIndex).GetChild(0).GetChild(3).gameObject;
|
|
if (text2 != null)
|
|
if (text2 != null)
|
|
{
|
|
{
|
|
text2.GetComponent<Text>().text = GlobalData.layerUnitDatas[index].text2;
|
|
text2.GetComponent<Text>().text = GlobalData.layerUnitDatas[index].text2;
|
|
@@ -897,7 +906,7 @@ public class YZTLayer : YZTRootLayer
|
|
newPoint.bingObj.transform.localPosition = tempLocalPosition;
|
|
newPoint.bingObj.transform.localPosition = tempLocalPosition;
|
|
newPoint.bingObj.name = temp.name;
|
|
newPoint.bingObj.name = temp.name;
|
|
|
|
|
|
- if ((int)temp.type == 6 || (int)temp.type == 7)
|
|
|
|
|
|
+ if ((int)temp.type == 6 || (int)temp.type == 7 || (int)temp.type == 9)
|
|
{
|
|
{
|
|
int index = FindIndexByLayerUnitName(temp.name);
|
|
int index = FindIndexByLayerUnitName(temp.name);
|
|
|
|
|
|
@@ -928,9 +937,9 @@ public class YZTLayer : YZTRootLayer
|
|
item0s[i].GetComponent<RectTransform>().SetParent(item0Parent.transform);
|
|
item0s[i].GetComponent<RectTransform>().SetParent(item0Parent.transform);
|
|
}
|
|
}
|
|
|
|
|
|
- Item0 item1 = Instantiate(item0Prefab, Vector3.zero, Quaternion.identity);
|
|
|
|
- item1.GetComponent<RectTransform>().SetParent(item0Parent.transform);
|
|
|
|
- item1.InitPoint(hotPointSprite[7], "GeTi", "隔堤", "1");
|
|
|
|
|
|
+ //Item0 item1 = Instantiate(item0Prefab, Vector3.zero, Quaternion.identity);
|
|
|
|
+ //item1.GetComponent<RectTransform>().SetParent(item0Parent.transform);
|
|
|
|
+ //item1.InitPoint(hotPointSprite[7], "GeTi", "隔堤", "1");
|
|
|
|
|
|
RunTimeLayerClick(0);
|
|
RunTimeLayerClick(0);
|
|
RunTimeLayerClick(1);
|
|
RunTimeLayerClick(1);
|
|
@@ -940,6 +949,7 @@ public class YZTLayer : YZTRootLayer
|
|
RunTimeLayerClick(5);
|
|
RunTimeLayerClick(5);
|
|
RunTimeLayerClick(6);
|
|
RunTimeLayerClick(6);
|
|
RunTimeLayerClick(8);
|
|
RunTimeLayerClick(8);
|
|
|
|
+ RunTimeLayerClick(9);
|
|
BaseLayer0BtnOnClick(true);
|
|
BaseLayer0BtnOnClick(true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -968,10 +978,10 @@ public class YZTLayer : YZTRootLayer
|
|
{
|
|
{
|
|
newName = "套口(闸上)";
|
|
newName = "套口(闸上)";
|
|
}
|
|
}
|
|
- //Debug.Log(newName);
|
|
|
|
|
|
+ Debug.Log(newName);
|
|
for (int i = 0; i < GlobalData.swDatas.Count; i++)
|
|
for (int i = 0; i < GlobalData.swDatas.Count; i++)
|
|
{
|
|
{
|
|
- //Debug.Log(GlobalData.swDatas[i].stnm);
|
|
|
|
|
|
+ Debug.Log(GlobalData.swDatas[i].stnm);
|
|
if (GlobalData.swDatas[i].stnm.Trim() == newName.Trim())
|
|
if (GlobalData.swDatas[i].stnm.Trim() == newName.Trim())
|
|
{
|
|
{
|
|
return i;
|
|
return i;
|