Files
Fishing2/Assets/Scripts/UI/Common/Panel/TestPanel.cs
Bob.Song 830cf3c354 settings
2026-03-25 17:07:05 +08:00

29 lines
606 B
C#

// 本脚本只在不存在时会生成一次。已存在不会再次生成覆盖
using FairyGUI;
using UnityEngine;
using NBC;
using UIPanel = NBC.UIPanel;
namespace NBF
{
public partial class TestPanel : UIPanel
{
protected override void OnInit()
{
this.AutoAddClick(OnClick);
}
public void OnClick(GComponent btn)
{
if (btn == BtnTest1)
{
Notices.Info("测试1");
}
else if (btn == BtnTest2)
{
Alert.Show("测试2");
}
}
}
}