using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.Events; using XRTool.Util; public class YunWeiZhiDao : AbstractController { public GameObject donghua; public string defultstring; public TextMeshProUGUI textUI; public TextMeshProUGUI textUI2; public List stringList = new List(); public List stringList2 = new List(); public int count; public GameObject resetGo; public UnityEvent OnReset = new UnityEvent(); // ÖØÖÃʼþ Vector3 initPV3 = new Vector3(57f, -148f, -346f); Vector3 initEV3 = new Vector3(0, -21.11f, 0); public void nextTask() { Debug.Log("nextTasknextTasknextTasknextTask"); textUI.text = stringList[count]; textUI2.text = stringList2[count]; count++; if (count >= stringList.Count) { resetGo.SetActive(true); } } public void back() { ScenesManager.Instance.showWindow(ScenesManager.SceneType.ShowChoose); } private void Update() { #if UNITY_EDITOR //if (Test) return; return; #endif OnReset?.Invoke(); } private void OnEnable() { textUI.text = defultstring; if (TimerMgr.Instance) { ResetDongHua(); } } public void ResetDongHua() { textUI.text = defultstring; textUI2.text = ""; resetGo.SetActive(false); count = 0; donghua.SetActive(false); TimerMgr.Instance.CreateTimer(() => { donghua.SetActive(true); }, 0.1f); donghua.transform.localPosition = initPV3; donghua.transform.localEulerAngles = initEV3; TimerMgr.Instance.CreateTimer(() => { count = 0; nextTask(); }, 3f); } }