64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
using UnityEngine;
|
|
|
|
namespace AibisDream.UI
|
|
{
|
|
public class EndPanel : MonoBehaviour, IUIPanel
|
|
{
|
|
public bool IsOpen => gameObject.activeSelf;
|
|
public bool IsCloseable => false;
|
|
|
|
#region 打开和关闭
|
|
|
|
public void Show()
|
|
{
|
|
// GameManager.Instance.PauseGame();
|
|
gameObject.SetActive(true);
|
|
// RegisterButton();
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
gameObject.SetActive(false);
|
|
// UnRegisterButton();
|
|
// GameManager.Instance.ContinueGame();
|
|
}
|
|
|
|
#endregion
|
|
|
|
// private void RegisterButton()
|
|
// {
|
|
// var returnBtn = transform.Find("返回").GetComponent<Button>();
|
|
// returnBtn.onClick.AddListener(BackToMain);
|
|
// var backToMain = transform.Find("问卷").GetComponent<Button>();
|
|
// backToMain.onClick.AddListener(OpenFeedbackLink);
|
|
// var quit = transform.Find("Bug反馈").GetComponent<Button>();
|
|
// quit.onClick.AddListener(OpenBugLink);
|
|
// }
|
|
|
|
// private void UnRegisterButton()
|
|
// {
|
|
// var returnBtn = transform.Find("返回").GetComponent<Button>();
|
|
// returnBtn.onClick.RemoveAllListeners();
|
|
// var backToMain = transform.Find("问卷").GetComponent<Button>();
|
|
// backToMain.onClick.RemoveAllListeners();
|
|
// var quit = transform.Find("Bug反馈").GetComponent<Button>();
|
|
// quit.onClick.RemoveAllListeners();
|
|
// }
|
|
|
|
private void BackToMain()
|
|
{
|
|
UIManager.Instance.HidePanel<EndPanel>();
|
|
GameManager.Instance.QuitGame();
|
|
}
|
|
|
|
// private void OpenFeedbackLink()
|
|
// {
|
|
// Application.OpenURL(ConstRef.SurveyURL);
|
|
// }
|
|
|
|
// private void OpenBugLink()
|
|
// {
|
|
// Application.OpenURL(ConstRef.BugSurveyURL);
|
|
// }
|
|
}
|
|
} |