using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UI : MonoSingleton { public Transform computer; public Help help; public List JdtLoads; public List operations; public GameObject effect; public GameObject operation; public GameObject jd; public Button btn; public GameObject gq; public Button close; public GameObject nextPanel; protected override void Awake() { base.Awake(); GameStageManager.Instance.stageDict[GameStage.漫游].OnEnterAdd += () => { effect.SetActive(true); EffectManager.Instance.EnableTipEffect(computer); help.gameObject.SetActive(false); operation.SetActive(false); jd.SetActive(false); btn.gameObject.SetActive(true); close.gameObject.SetActive(false); }; GameStageManager.Instance.stageDict[GameStage.展示].OnEnterAdd += () => { help.gameObject.SetActive(true); //close.gameObject.SetActive(true); }; GameStageManager.Instance.stageDict[GameStage.帮助].OnEnterAdd += () => { help.gameObject.SetActive(true); operation.SetActive(true); jd.SetActive(true); //close.gameObject.SetActive(true); }; btn.onClick.AddListener(() => { EffectManager.Instance.DisableTipEffect(); GameManager.Instance.MoveComputer(); effect.SetActive(true); btn.gameObject.SetActive(false); }); close.onClick.AddListener(() => { TimeLineManager.Instance.closeComputer.Play(); GameStageManager.Instance.currentStage = GameStage.漫游; }); } public void UpdateJDT() { JdtLoads[(int)GameManager.progress].Load(); } public void CloseOperation() { operations[(int)GameManager.progress].gameObject.SetActive(false); } }