You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
2.1 KiB
76 lines
2.1 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class UI : MonoSingleton<UI>
|
|
{
|
|
public Transform computer;
|
|
public Help help;
|
|
public List<JDTLoad> JdtLoads;
|
|
public List<InteractiveUI> 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);
|
|
}
|
|
|
|
}
|