XHDDLayer.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  1. using DG.Tweening;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Threading.Tasks;
  6. using UnityAsync;
  7. using UnityEngine;
  8. using UnityEngine.UI;
  9. using WaitUntil = UnityAsync.WaitUntil;
  10. [System.Serializable]
  11. public enum YJType
  12. {
  13. YELLOW,
  14. ORANGE,
  15. RED
  16. }
  17. [Serializable]
  18. public class SchedulingPlan
  19. {
  20. public float max_water_level;
  21. public string max_water_level_unit;
  22. public string max_water_level_time;
  23. public float flood_peak_flow_rate;
  24. public string flood_peak_flow_rate_unit;
  25. public float intercepted_flood_volume;
  26. public string intercepted_flood_volume_unit;
  27. public int peak_reduction_rate;
  28. public float final_water_level;
  29. public string final_water_level_unit;
  30. }
  31. [Serializable]
  32. public class SchedulingResults
  33. {
  34. public float inflow_peak;
  35. public string inflow_peak_unit;
  36. public float outflow_total;
  37. public string outflow_total_unit;
  38. public float initial_water_level;
  39. public string initial_water_level_unit;
  40. public float target_water_level;
  41. public string target_water_level_unit;
  42. }
  43. [Serializable]
  44. public class RiskInformation
  45. {
  46. public string warning_level;
  47. public float submerged_area;
  48. public string submerged_area_unit;
  49. public float submerged_farmland_area;
  50. public string submerged_farmland_area_unit;
  51. public float affected_population;
  52. public string affected_population_unit;
  53. public float submerged_area_gdp;
  54. public string submerged_area_gdp_unit;
  55. public float flood_loss;
  56. public string flood_loss_unit;
  57. }
  58. [Serializable]
  59. public class PersonnelSupport
  60. {
  61. public int id;
  62. public string person;
  63. public string unit;
  64. public string position;
  65. public string phone;
  66. }
  67. [Serializable]
  68. public class MaterialSupport
  69. {
  70. public int id;
  71. public string type;
  72. public int quantity;
  73. public string unit;
  74. public string person_in_charge;
  75. public string region;
  76. }
  77. [Serializable]
  78. public class Data
  79. {
  80. public SchedulingPlan scheduling_plan;
  81. public SchedulingResults scheduling_results;
  82. public RiskInformation risk_information;
  83. public List<PersonnelSupport> personnel_support;
  84. public List<MaterialSupport> material_support;
  85. }
  86. [Serializable]
  87. public class SchedulingData
  88. {
  89. public int id;
  90. public string scheduling_name;
  91. public Data data;
  92. }
  93. public class XHDDLayer : YZTRootLayer
  94. {
  95. public RectTransform qxhddContent;
  96. public RectTransform xhddContent;
  97. public Button enterBtn;
  98. public Button exitBtn;
  99. public Button playBtn;
  100. public List<Text> threeStepBtns = new List<Text>();
  101. public Dropdown yjDropdown;
  102. public Button[] yjButtons;
  103. public YJType yJType;
  104. public string[,] allYAContent = new string[3, 3];
  105. public bool playing = false;
  106. float currentTime = 0;
  107. [Header("UpLeft")]
  108. public Text ddNameText;
  109. public Text zuigaoshuiweiText;
  110. public Text zuigaoshuiweishijianText;
  111. public Text hongfengliusuText;
  112. public Text lanxuhongliangText;
  113. public Text xuefenglvText;
  114. public Text moqishuiweiText;
  115. [Header("MiddleLeft")]
  116. public Text rukuhongfengText;
  117. public Text qitiaoshuiweiText;
  118. public Text chukuzongliuliangText;
  119. public Text mubiaoshuiweiText;
  120. [Header("DownLeft")]
  121. public RectTransform rkzyContent;
  122. public GameObject rkzyPrefab;
  123. [Header("UpRight")]
  124. public Text fengxiandengjiText;
  125. public Text yanmomianjiText;
  126. public Text yanmogengdiText;
  127. public Text yingxiangrenkouText;
  128. public Text gDPText;
  129. public Text hongshuisunshiText;
  130. [Header("MiddleRight")]
  131. public RectTransform rybzContent;
  132. public GameObject rybzPrefab;
  133. [Header("DownRight")]
  134. public RectTransform wzbzContent;
  135. public GameObject wzbzPrefab;
  136. [Header("损失概况")]
  137. public GameObject SunShiGaiKuangPanel;
  138. public Text yanMoMianJiText;
  139. public Text yanMoGengDiText;
  140. public Text yanMoRenKouText;
  141. public Text sunShiCaiChanText;
  142. public GameObject sunShiLieBiaoPrefab;
  143. public Transform sunShiLieBiaoContent;
  144. // Start is called before the first frame update
  145. void Start()
  146. {
  147. InitYAContent();
  148. InitButton();
  149. InitUpLeft();
  150. InitMiddleLeft();
  151. InitDownLeft();
  152. InitUpRight();
  153. InitMiddleRight();
  154. InitDownRight();
  155. }
  156. private void OnEnable()
  157. {
  158. CameraManager.SwitchCamera(0);
  159. StaticLod.instance.OnFoucusStatic(1);
  160. TimeLineControl.instance.transform.GetChild(1).GetChild(0).gameObject.SetActive(true);
  161. TimeLineControl.instance.transform.GetChild(1).GetChild(1).gameObject.SetActive(true);
  162. GameObject.FindGameObjectWithTag("HeMianStatic").transform.GetChild(2).gameObject.SetActive(false);
  163. }
  164. private void InitUpLeft()
  165. {
  166. ddNameText.text = GlobalData.schedulingData.scheduling_name;
  167. zuigaoshuiweiText.text = $"{GlobalData.schedulingData.data.scheduling_plan.max_water_level} <size=12><color=#A5BBE2>m</color></size>";
  168. zuigaoshuiweishijianText.text = $"{GlobalData.schedulingData.data.scheduling_plan.max_water_level_time}";
  169. hongfengliusuText.text = $"{GlobalData.schedulingData.data.scheduling_plan.flood_peak_flow_rate} <size=12><color=#A5BBE2>m³/s</color></size>";
  170. lanxuhongliangText.text = $"{GlobalData.schedulingData.data.scheduling_plan.intercepted_flood_volume} <size=12><color=#A5BBE2>m³/s</color></size>";
  171. xuefenglvText.text = $"{GlobalData.schedulingData.data.scheduling_plan.peak_reduction_rate} <size=12><color=#A5BBE2>%</color></size>";
  172. moqishuiweiText.text = $"{GlobalData.schedulingData.data.scheduling_plan.final_water_level} <size=12><color=#A5BBE2>m</color></size>";
  173. }
  174. private void InitMiddleLeft()
  175. {
  176. rukuhongfengText.text = $"{GlobalData.schedulingData.data.scheduling_results.inflow_peak} <size=14><color=#A5BBE2>m³/s</color></size>";
  177. qitiaoshuiweiText.text = $"{GlobalData.schedulingData.data.scheduling_results.outflow_total} <size=14><color=#A5BBE2>m</color></size>";
  178. chukuzongliuliangText.text = $"{GlobalData.schedulingData.data.scheduling_results.initial_water_level} <size=14><color=#A5BBE2>m³/s</color></size>";
  179. mubiaoshuiweiText.text = $"{GlobalData.schedulingData.data.scheduling_results.target_water_level} <size=14><color=#A5BBE2>m</color></size>";
  180. }
  181. private async Task InitDownLeft()
  182. {
  183. await new WaitUntil(() =>
  184. {
  185. return GlobalData.allServerMovePlans.Count > 0;
  186. });
  187. for (int i = 0; i < GlobalData.allServerMovePlans.Count; i++)
  188. {
  189. GameObject obj = Instantiate(rkzyPrefab);
  190. obj.transform.SetParent(rkzyContent);
  191. obj.transform.localScale = Vector3.one;
  192. obj.transform.GetChild(0).GetComponent<Text>().text = i.ToString();
  193. obj.transform.GetChild(1).GetComponent<Text>().text = GlobalData.allServerMovePlans[i].from;
  194. obj.transform.GetChild(2).GetComponent<Text>().text = GlobalData.allServerMovePlans[i].to;
  195. obj.transform.GetChild(3).GetComponent<Text>().text = CoordinateConverter.Haversine(GlobalData.allServerMovePlans[i].fromLttd, GlobalData.allServerMovePlans[i].fromLong, GlobalData.allServerMovePlans[i].toLttd, GlobalData.allServerMovePlans[i].toLong).ToString("0.00") + "km";
  196. obj.transform.GetChild(4).GetComponent<Text>().text = GlobalData.allServerMovePlans[i].manNum.ToString();
  197. }
  198. }
  199. private void InitUpRight()
  200. {
  201. fengxiandengjiText.text = $"{GlobalData.schedulingData.data.risk_information.warning_level} <size=14><color=#A5BFE2>级</color></size>";
  202. yanmomianjiText.text = $"{GlobalData.schedulingData.data.risk_information.submerged_area} <size=14><color=#A5BFE2>k㎡</color></size>";
  203. yanmogengdiText.text = $"{GlobalData.schedulingData.data.risk_information.submerged_farmland_area} <size=14><color=#A5BFE2>h㎡</color></size>";
  204. yingxiangrenkouText.text = $"{GlobalData.schedulingData.data.risk_information.affected_population} <size=14><color=#A5BFE2>万人</color></size>";
  205. gDPText.text = $"{GlobalData.schedulingData.data.risk_information.submerged_area_gdp} <size=14><color=#A5BFE2>亿元</color></size>";
  206. hongshuisunshiText.text = $"{GlobalData.schedulingData.data.risk_information.flood_loss} <size=14><color=#A5BFE2>亿元</color></size>";
  207. }
  208. private void InitMiddleRight()
  209. {
  210. for (int i = 0; i < GlobalData.schedulingData.data.personnel_support.Count; i++)
  211. {
  212. GameObject obj = Instantiate(rybzPrefab);
  213. obj.transform.SetParent(rybzContent);
  214. obj.transform.localScale = Vector3.one;
  215. obj.transform.GetChild(0).GetComponent<Text>().text = GlobalData.schedulingData.data.personnel_support[i].id.ToString();
  216. obj.transform.GetChild(1).GetComponent<Text>().text = GlobalData.schedulingData.data.personnel_support[i].person;
  217. obj.transform.GetChild(2).GetComponent<Text>().text = GlobalData.schedulingData.data.personnel_support[i].unit;
  218. obj.transform.GetChild(3).GetComponent<Text>().text = GlobalData.schedulingData.data.personnel_support[i].position.ToString();
  219. obj.transform.GetChild(4).GetComponent<Text>().text = GlobalData.schedulingData.data.personnel_support[i].phone.ToString();
  220. }
  221. }
  222. private void InitDownRight()
  223. {
  224. for (int i = 0; i < GlobalData.schedulingData.data.material_support.Count; i++)
  225. {
  226. GameObject obj = Instantiate(wzbzPrefab);
  227. obj.transform.SetParent(wzbzContent);
  228. obj.transform.localScale = Vector3.one;
  229. obj.transform.GetChild(0).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].id.ToString();
  230. obj.transform.GetChild(1).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].type;
  231. obj.transform.GetChild(2).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].quantity.ToString() + GlobalData.schedulingData.data.material_support[i].unit.ToString();
  232. obj.transform.GetChild(3).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].unit.ToString();
  233. obj.transform.GetChild(4).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].person_in_charge.ToString();
  234. obj.transform.GetChild(5).GetComponent<Text>().text = GlobalData.schedulingData.data.material_support[i].region.ToString();
  235. }
  236. }
  237. public override void OnUILeave()
  238. {
  239. base.OnUILeave();
  240. OnExitXHDDYS();
  241. }
  242. void InitYAContent()
  243. {
  244. allYAContent[0, 0] = "当预报洪水将达到或超过蓄滞洪区启用标准时(套口进洪闸的设防水位为32m),发布黄色预警,做好运用准备。";
  245. allYAContent[0, 1] = "分洪前线指挥部及其下设七个责任组责任人和成员迅速进入运用准备状态,服从前指的统一调度。";
  246. allYAContent[0, 2] = "分蓄洪区内各个乡镇、村组确定1名领导专门负责承担警报发布和传递任务。警报一经发布,各项避洪工作必须迅速及时,不得有误。";
  247. allYAContent[1, 0] = "当需要区内人员转移时,发布橙色预警,开始实施分蓄洪区内居民转移、清场等工作。";
  248. allYAContent[1, 1] = "人员转移时机根据荆江河段及城陵矶附近地区实时水情、防洪工程情况和区内人员转移所需时间等确定。";
  249. allYAContent[1, 2] = "采取电视、广播、电话、传真、汽笛、敲锣、挂旗、报警器、鸣枪或挨户通知等一切可能的形式迅速向分洪区传播分洪转移命令。";
  250. allYAContent[2, 0] = "当决定启用蓄滞洪区时,发布红色警报。";
  251. allYAContent[2, 1] = "开启套口进洪闸或实施上车湾口门爆破,开始分蓄洪。";
  252. allYAContent[2, 2] = "红色警报期持续至具备返迁条件时为止。";
  253. }
  254. void OnExitXHDDYS()
  255. {
  256. qxhddContent.gameObject.SetActive(true);
  257. xhddContent.gameObject.SetActive(false);
  258. playBtn.interactable = true;
  259. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  260. playing = false;
  261. AllRestore();
  262. }
  263. void InitButton()
  264. {
  265. enterBtn.onClick.AddListener(() =>
  266. {
  267. qxhddContent.gameObject.SetActive(false);
  268. xhddContent.gameObject.SetActive(true);
  269. });
  270. exitBtn.onClick.AddListener(OnExitXHDDYS);
  271. for (int i = 0; i < yjButtons.Length; i++)
  272. {
  273. int temp = i;
  274. yjButtons[i].onClick.AddListener(() =>
  275. {
  276. if (!playing)
  277. {
  278. ClearAllText();
  279. }
  280. for (int j = 0; j < yjButtons.Length; j++)
  281. {
  282. yjButtons[j].GetComponent<CanvasGroup>().alpha = 0.2f;
  283. }
  284. yjButtons[temp].GetComponent<CanvasGroup>().alpha = 1f;
  285. yJType = (YJType)temp;
  286. yjDropdown.value = temp;
  287. });
  288. }
  289. yjDropdown.onValueChanged.AddListener((int value) =>
  290. {
  291. if (!playing)
  292. {
  293. ClearAllText();
  294. }
  295. for (int j = 0; j < yjButtons.Length; j++)
  296. {
  297. yjButtons[j].GetComponent<CanvasGroup>().alpha = 0.2f;
  298. }
  299. yjButtons[value].GetComponent<CanvasGroup>().alpha = 1f;
  300. yJType = (YJType)value;
  301. });
  302. playBtn.onClick.AddListener(() =>
  303. {
  304. ClearAllText();
  305. playing = true;
  306. playBtn.interactable = false;
  307. playBtn.GetComponentInChildren<Text>().text = "演示中...";
  308. currentTime = 0;
  309. ControlYJ();
  310. });
  311. }
  312. void AllRestore()
  313. {
  314. TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = Vector3.zero;
  315. TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(false);
  316. TimeLineControl.instance.transform.GetChild(2).GetChild(0).gameObject.SetActive(false);
  317. GameObject.FindGameObjectWithTag("HeMianStatic").transform.GetChild(2).gameObject.SetActive(true);
  318. Material material = TimeLineControl.instance.transform.GetChild(1).GetChild(0).GetComponent<MeshRenderer>().material;
  319. ClearAllText();
  320. material.SetFloat("_ClipLength", 1);
  321. currentTime = 0;
  322. }
  323. void ClearAllText()
  324. {
  325. for (int i = 0; i < threeStepBtns.Count; i++)
  326. {
  327. threeStepBtns[i].text = "";
  328. }
  329. }
  330. async void ControlYJ()
  331. {
  332. switch (yJType)
  333. {
  334. case YJType.YELLOW:
  335. TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = Vector3.zero;
  336. threeStepBtns[0].text = allYAContent[(int)yJType, 0];
  337. await new WaitUntil(() =>
  338. {
  339. return currentTime > 1;
  340. });
  341. if (!playing)
  342. {
  343. playBtn.interactable = true;
  344. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  345. return;
  346. }
  347. StaticLod.instance.OnFoucusStatic("Bird1");
  348. await new WaitUntil(() =>
  349. {
  350. return currentTime > 3;
  351. });
  352. if (!playing)
  353. {
  354. playBtn.interactable = true;
  355. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  356. return;
  357. }
  358. TimeLineControl.instance.transform.GetChild(1).GetChild(1).DOLocalMove(new Vector3(0, 0, 31.2f), 12.0f);
  359. await new WaitUntil(() =>
  360. {
  361. return currentTime > 14;
  362. });
  363. if (!playing)
  364. {
  365. playBtn.interactable = true;
  366. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  367. return;
  368. }
  369. threeStepBtns[1].text = allYAContent[(int)yJType, 1];
  370. StaticLod.instance.OnFoucusStatic("Bird2");
  371. await new WaitUntil(() =>
  372. {
  373. return currentTime > 17;
  374. });
  375. if (!playing)
  376. {
  377. playBtn.interactable = true;
  378. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  379. return;
  380. }
  381. threeStepBtns[2].text = allYAContent[(int)yJType, 2];
  382. playBtn.interactable = true;
  383. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  384. break;
  385. case YJType.ORANGE:
  386. TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = new Vector3(0, 0, 31.2f);
  387. TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(false);
  388. threeStepBtns[0].text = allYAContent[(int)yJType, 0];
  389. await new WaitUntil(() =>
  390. {
  391. return currentTime > 1;
  392. });
  393. if (!playing)
  394. {
  395. playBtn.interactable = true;
  396. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  397. return;
  398. }
  399. StaticLod.instance.OnFoucusStatic("Bird3");
  400. await new WaitUntil(() =>
  401. {
  402. return currentTime > 3;
  403. });
  404. if (!playing)
  405. {
  406. playBtn.interactable = true;
  407. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  408. return;
  409. }
  410. TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(true);
  411. await new WaitUntil(() =>
  412. {
  413. return currentTime > 11;
  414. });
  415. if (!playing)
  416. {
  417. playBtn.interactable = true;
  418. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  419. return;
  420. }
  421. threeStepBtns[1].text = allYAContent[(int)yJType, 1];
  422. //StaticLod.instance.OnFoucusStatic("Bird3");
  423. await new WaitUntil(() =>
  424. {
  425. return currentTime > 14;
  426. });
  427. if (!playing)
  428. {
  429. playBtn.interactable = true;
  430. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  431. return;
  432. }
  433. threeStepBtns[2].text = allYAContent[(int)yJType, 2];
  434. playBtn.interactable = true;
  435. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  436. break;
  437. case YJType.RED:
  438. Material material = TimeLineControl.instance.transform.GetChild(1).GetChild(0).GetComponent<MeshRenderer>().material;
  439. TimeLineControl.instance.transform.GetChild(0).gameObject.SetActive(false);
  440. material.SetFloat("_ClipLength", 1);
  441. TimeLineControl.instance.transform.GetChild(1).GetChild(1).localPosition = new Vector3(0, 0, 31.2f);
  442. TimeLineControl.instance.transform.GetChild(2).GetChild(0).gameObject.SetActive(false);
  443. threeStepBtns[0].text = allYAContent[(int)yJType, 0];
  444. await new WaitUntil(() =>
  445. {
  446. return currentTime > 1;
  447. });
  448. if (!playing)
  449. {
  450. playBtn.interactable = true;
  451. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  452. return;
  453. }
  454. StaticLod.instance.OnFoucusStatic("Bird2");
  455. await new WaitUntil(() =>
  456. {
  457. return currentTime > 4;
  458. });
  459. if (!playing)
  460. {
  461. playBtn.interactable = true;
  462. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  463. return;
  464. }
  465. StaticLod.instance.OnFoucusStatic("Bird4");
  466. //ActionInstance._Instance.ModelAni_On?.Invoke(null);
  467. await new WaitUntil(() =>
  468. {
  469. return currentTime > 5.2;
  470. });
  471. TimeLineControl.instance.transform.GetChild(2).GetChild(0).gameObject.SetActive(true);
  472. if (!playing)
  473. {
  474. playBtn.interactable = true;
  475. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  476. return;
  477. }
  478. await new WaitUntil(() =>
  479. {
  480. return currentTime > 5.7;
  481. });
  482. material.SetFloat("_ClipLength", 0.981f);
  483. if (!playing)
  484. {
  485. playBtn.interactable = true;
  486. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  487. return;
  488. }
  489. threeStepBtns[1].text = allYAContent[(int)yJType, 1];
  490. await new WaitUntil(() =>
  491. {
  492. return currentTime > 7.7;
  493. });
  494. if (!playing)
  495. {
  496. playBtn.interactable = true;
  497. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  498. return;
  499. }
  500. StaticLod.instance.OnFoucusStatic("Bird5");
  501. DOTween.To(() => material.GetFloat("_ClipLength"), x => material.SetFloat("_ClipLength", x), 0.881f, 4f);
  502. await new WaitUntil(() =>
  503. {
  504. return currentTime > 12.7;
  505. });
  506. if (!playing)
  507. {
  508. playBtn.interactable = true;
  509. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  510. return;
  511. }
  512. StaticLod.instance.OnFoucusStatic("Bird3");
  513. DOTween.To(() => material.GetFloat("_ClipLength"), x => material.SetFloat("_ClipLength", x), 0.1f, 6f);
  514. await new WaitUntil(() =>
  515. {
  516. return currentTime > 18.7;
  517. });
  518. if (!playing)
  519. {
  520. playBtn.interactable = true;
  521. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  522. return;
  523. }
  524. threeStepBtns[2].text = allYAContent[(int)yJType, 2];
  525. playBtn.interactable = true;
  526. playBtn.GetComponentInChildren<Text>().text = "开始演示";
  527. break;
  528. }
  529. }
  530. // Update is called once per frame
  531. void Update()
  532. {
  533. currentTime += Time.deltaTime;
  534. }
  535. }