using UnityEngine; using UnityEngine.UI; using AibisDream.Utility; namespace AibisDream { public class SettingPanel : MonoBehaviour, IUIPanel { public bool IsOpen => gameObject.activeSelf; public bool IsCloseable => true; #region 打开和关闭 public void Show() { // 暂停游戏 GameManager.Instance.PauseGame(); gameObject.SetActive(true); // 更新表单内容 var form = GetComponentInChildren(); form.Init(); // 注册函数 RegisterButton(); } public void Hide() { // 更新表单内容 var form = GetComponentInChildren(); form.UnInit(); UnRegisterButton(); gameObject.SetActive(false); // 继续游戏 GameManager.Instance.ContinueGame(); } #endregion private void RegisterButton() { var mainGroup = transform.Find("Main"); var buttonGroup = mainGroup.Find("Button Group"); var continueBtn = buttonGroup.Find("Continue").GetComponent