1.定义BasePanel内所含变量;
protected string packageName,Transition transition,Controller controller,GComponent panelMask,UIPanelType currentUIPanelType,UIManager uiManager;
2.BasePanel构造函数;
public BasePanel(string packageName,UIPanelType uiPanelType,UIManager uiManager)
{this.packageName=packageName;
currentUIPanelType=uiPanelType;
this.uiManager=uiManager;
UIPackage.AddPackage("UI/"+packageName);
}
3.protected override void OnInit()
{contentPanel=UIPackage.CreateObject(packageName,"Main").asCom;
panelMask=this.contentPanel.GetChild("PanelMask").asCom
OnInitPanel()
4.protected virtual void OnInitPanel()
}