Files
aibis-dream/Assets/Scripts/UI/Panel/EndPanel.cs
T
Yuntien 5f2d07d496 问题修复
1. 自动模式下无法手动点击跳过
2. 部分情况下鼠标指针错误
3. 版本号现在可在主界面显示
4. 增加展会版本计时器功能
5. Demo结束时打开结尾UI
2025-11-22 01:00:53 +08:00

55 lines
1.3 KiB
C#

using UnityEngine;
using UnityEngine.UI;
namespace AibisDream.UI
{
public class EndPanel : MonoBehaviour, IUIPanel
{
public bool IsOpen => gameObject.activeSelf;
public bool IsCloseable => false;
#region 打开和关闭
public void Show()
{
gameObject.SetActive(true);
RegisterButton();
}
public void Hide()
{
gameObject.SetActive(false);
UnRegisterButton();
}
#endregion
private void RegisterButton()
{
var returnBtn = transform.Find("返回").GetComponent<Button>();
returnBtn.onClick.AddListener(BackToMain);
}
private void UnRegisterButton()
{
var returnBtn = transform.Find("返回").GetComponent<Button>();
returnBtn.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);
// }
}
}