|
@@ -119,7 +119,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
|
|
|
public string[,] allYAContent = new string[3, 3];
|
|
|
|
|
|
- bool playing = false;
|
|
|
+ public bool playing = false;
|
|
|
|
|
|
float currentTime = 0;
|
|
|
|
|
@@ -271,7 +271,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
public override void OnUILeave()
|
|
|
{
|
|
|
base.OnUILeave();
|
|
|
- AllRestore();
|
|
|
+ OnExitXHDDYS();
|
|
|
}
|
|
|
|
|
|
void InitYAContent()
|
|
@@ -288,6 +288,17 @@ public class XHDDLayer : YZTRootLayer
|
|
|
allYAContent[2, 1] = "开启套口进洪闸或实施上车湾口门爆破,开始分蓄洪。";
|
|
|
allYAContent[2, 2] = "红色警报期持续至具备返迁条件时为止。";
|
|
|
}
|
|
|
+
|
|
|
+ void OnExitXHDDYS()
|
|
|
+ {
|
|
|
+ qxhddContent.gameObject.SetActive(true);
|
|
|
+ xhddContent.gameObject.SetActive(false);
|
|
|
+ playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
+ playing = false;
|
|
|
+ AllRestore();
|
|
|
+ }
|
|
|
+
|
|
|
void InitButton()
|
|
|
{
|
|
|
enterBtn.onClick.AddListener(() =>
|
|
@@ -296,14 +307,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
xhddContent.gameObject.SetActive(true);
|
|
|
});
|
|
|
|
|
|
- exitBtn.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- qxhddContent.gameObject.SetActive(true);
|
|
|
- xhddContent.gameObject.SetActive(false);
|
|
|
- playBtn.interactable = true;
|
|
|
- playing = false;
|
|
|
- AllRestore();
|
|
|
- });
|
|
|
+ exitBtn.onClick.AddListener(OnExitXHDDYS);
|
|
|
|
|
|
for (int i = 0; i < yjButtons.Length; i++)
|
|
|
{
|
|
@@ -323,14 +327,30 @@ public class XHDDLayer : YZTRootLayer
|
|
|
yJType = (YJType)temp;
|
|
|
yjDropdown.value = temp;
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
|
|
|
+ yjDropdown.onValueChanged.AddListener((int value) =>
|
|
|
+ {
|
|
|
+ if (!playing)
|
|
|
+ {
|
|
|
+ ClearAllText();
|
|
|
+ }
|
|
|
+ for (int j = 0; j < yjButtons.Length; j++)
|
|
|
+ {
|
|
|
+ yjButtons[j].GetComponent<CanvasGroup>().alpha = 0.2f;
|
|
|
+
|
|
|
+ }
|
|
|
+ yjButtons[value].GetComponent<CanvasGroup>().alpha = 1f;
|
|
|
+ yJType = (YJType)value;
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
playBtn.onClick.AddListener(() =>
|
|
|
{
|
|
|
ClearAllText();
|
|
|
playing = true;
|
|
|
playBtn.interactable = false;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "演示中...";
|
|
|
currentTime = 0;
|
|
|
ControlYJ();
|
|
|
});
|
|
@@ -340,10 +360,10 @@ public class XHDDLayer : YZTRootLayer
|
|
|
{
|
|
|
TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = Vector3.zero;
|
|
|
TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(false);
|
|
|
- TimeLineControl.instance.transform.GetChild(1).GetChild(0).gameObject.SetActive(false);
|
|
|
- TimeLineControl.instance.transform.GetChild(1).GetChild(1).gameObject.SetActive(false);
|
|
|
+ TimeLineControl.instance.transform.GetChild(2).GetChild(0).gameObject.SetActive(false);
|
|
|
GameObject.FindGameObjectWithTag("HeMianStatic").transform.GetChild(2).gameObject.SetActive(true);
|
|
|
Material material = TimeLineControl.instance.transform.GetChild(1).GetChild(0).GetComponent<MeshRenderer>().material;
|
|
|
+ ClearAllText();
|
|
|
material.SetFloat("_ClipLength", 1);
|
|
|
currentTime = 0;
|
|
|
}
|
|
@@ -370,6 +390,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
StaticLod.instance.OnFoucusStatic("Bird1");
|
|
@@ -380,6 +401,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
TimeLineControl.instance.transform.GetChild(1).GetChild(1).DOLocalMove(new Vector3(0, 0, 31.2f), 12.0f);
|
|
@@ -390,6 +412,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
threeStepBtns[1].text = allYAContent[(int)yJType, 1];
|
|
@@ -401,10 +424,12 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
threeStepBtns[2].text = allYAContent[(int)yJType, 2];
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
break;
|
|
|
case YJType.ORANGE:
|
|
|
TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = new Vector3(0, 0, 31.2f);
|
|
@@ -417,9 +442,10 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
- StaticLod.instance.OnFoucusStatic("Bird2");
|
|
|
+ StaticLod.instance.OnFoucusStatic("Bird3");
|
|
|
await new WaitUntil(() =>
|
|
|
{
|
|
|
return currentTime > 3;
|
|
@@ -427,6 +453,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(true);
|
|
@@ -437,10 +464,11 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
threeStepBtns[1].text = allYAContent[(int)yJType, 1];
|
|
|
- StaticLod.instance.OnFoucusStatic("Bird3");
|
|
|
+ //StaticLod.instance.OnFoucusStatic("Bird3");
|
|
|
await new WaitUntil(() =>
|
|
|
{
|
|
|
return currentTime > 14;
|
|
@@ -448,10 +476,12 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
threeStepBtns[2].text = allYAContent[(int)yJType, 2];
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
break;
|
|
|
case YJType.RED:
|
|
|
Material material = TimeLineControl.instance.transform.GetChild(1).GetChild(0).GetComponent<MeshRenderer>().material;
|
|
@@ -467,6 +497,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
StaticLod.instance.OnFoucusStatic("Bird2");
|
|
@@ -477,6 +508,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
StaticLod.instance.OnFoucusStatic("Bird4");
|
|
@@ -489,6 +521,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
await new WaitUntil(() =>
|
|
@@ -500,6 +533,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
threeStepBtns[1].text = allYAContent[(int)yJType, 1];
|
|
@@ -510,6 +544,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
StaticLod.instance.OnFoucusStatic("Bird5");
|
|
@@ -521,6 +556,7 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
StaticLod.instance.OnFoucusStatic("Bird3");
|
|
@@ -532,11 +568,13 @@ public class XHDDLayer : YZTRootLayer
|
|
|
if (!playing)
|
|
|
{
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
threeStepBtns[2].text = allYAContent[(int)yJType, 2];
|
|
|
playBtn.interactable = true;
|
|
|
+ playBtn.GetComponentInChildren<Text>().text = "开始演示";
|
|
|
break;
|
|
|
}
|
|
|
}
|