示例代码:
cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BeginPanel : BasePanel<BeginPanel>
{
public UIButton btnBegin;
public UIButton btnRank;
public UIButton btnSetting;
public UIButton btnQuit;
protected override void Init()
{
btnBegin.onClick.Add(new EventDelegate ( () =>
{
//显示武器面板
print("选角");
//隐藏自己
HideMe();
}));
btnRank.onClick.Add(new EventDelegate(() =>
{
//显示排行榜
print("排行榜");
}));
btnSetting.onClick.Add(new EventDelegate(() =>
{
//显示设置面板
print("设置");
}));
btnQuit.onClick.Add(new EventDelegate(() =>
{
//退出游戏
print("退出");
Application.Quit();
}));
}
}