using UnityEngine; using UnityEngine.UI; namespace AibisDream.UI { public class MainPanel : MonoBehaviour, IUIPanel { public bool IsOpen => gameObject.activeSelf; public bool IsCloseable => false; private BoolButton _autoBtn; private BoolButton _ffwdBtn; #region 面板控制 public void Show() { gameObject.SetActive(true); } public void Hide() { gameObject.SetActive(false); } #endregion private void Awake() { RegisterButton(); } private void Update() { if (Input.GetKey(KeyCode.Q) && Input.GetKeyDown(KeyCode.P)) { var obj = transform.Find("Top Bar").Find("Quick Forward").gameObject; var active = obj.activeSelf; obj.SetActive(!active); } } private void RegisterButton() { // 为按钮注册事件 var topBar = transform.Find("Top Bar"); topBar.Find("Setting").GetComponent