Files
Fishing2/Assets/Scripts/UI/Home/Pages/HomeMainPage.cs
2025-06-03 14:28:20 +08:00

64 lines
1.4 KiB
C#

// 本脚本只在不存在时会生成一次。组件逻辑写在当前脚本内。已存在不会再次生成覆盖
using System.Collections.Generic;
using UnityEngine;
using FairyGUI;
using NBC;
namespace NBF
{
public partial class HomeMainPage : HomePageBase
{
private void OnInited()
{
}
protected override void OnShow()
{
InputManager.OnUICanceled += OnUICanceled;
UseBottomMenu();
}
protected override void OnHide()
{
BottomMenu.OnBack -= OnBack;
BottomMenu.OnEnter -= OnApplySettings;
BottomMenu.UnUse();
InputManager.OnUICanceled -= OnUICanceled;
}
private void OnUICanceled(string action)
{
if (action == InputDef.UI.SubPrev)
{
}
else if (action == InputDef.UI.SubNext)
{
}
else if (action == InputDef.UI.Up)
{
}
else if (action == InputDef.UI.Down)
{
}
}
private void UseBottomMenu()
{
BottomMenu.OnBack += OnBack;
BottomMenu.OnEnter += OnApplySettings;
BottomMenu.Use();
}
private void OnApplySettings()
{
}
private void OnBack()
{
UI.Inst.HideUI<HomePanel>();
}
}
}