123456789101112131415161718192021222324252627282930313233343536373839 |
- using FL.FGUI;
- using XGame.Framework.Asyncs;
- using XGame.Framework.FGUI;
- using XGame.Framework.Loadable;
- using XGame.Framework.Nodes;
- namespace FL.Nodes.GameMain
- {
- public class UIComponent : NodeComponent, ILoadAsyncHandle
- {
- public override void OnEnable(object intent)
- {
- Context.UI.OpenAsync(UIKeys.MainHomePanel, "打开MainHomePanel");
- Context.UI.OpenAsync(UIKeys.MainHomeBottomPanel);
- Context.Tree.AddAsync(NodeKeys.Partners);
- Context.Tree.AddAsync(NodeKeys.DragonEgg);
- Context.Tree.Remove(NodeKeys.Login, true);
- }
- public override void OnDisable()
- {
- Context.UI.Close(UIKeys.MainHomePanel);
- Context.UI.Close(UIKeys.MainHomeBottomPanel);
- Context.UI.Close(UIKeys.CommonToastPanel);
- Context.Tree.Remove(NodeKeys.Partners);
- Context.Tree.Remove(NodeKeys.DragonEgg);
- }
- void ILoadAsyncHandle.OnLoadAsync(IAsyncGroup group)
- {
- Context.UI.Preload(UINestedKeys.CommonItemBase).Join(group);
- }
- void ILoadAsyncHandle.OnUnloadAsync(IAsyncGroup group)
- {
- }
- }
- }
|