示例代码:
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();}));}
}