UIComponent.cs 651 B

1234567891011121314151617181920212223242526
  1. using System.Collections.Generic;
  2. using FL.FGUI;
  3. using FL.Network;
  4. using XGame.Framework.Nodes;
  5. namespace FL.Nodes.Item
  6. {
  7. public class UIComponent : NodeComponent
  8. {
  9. public override void OnEnable(object intent)
  10. {
  11. Context.AddListener(EventDefine.ItemRwdWin, OnRwdWin);
  12. }
  13. public override void OnDisable()
  14. {
  15. Context.RemoveListener(EventDefine.ItemRwdWin, OnRwdWin);
  16. }
  17. public void OnRwdWin(int eventId, object args)
  18. {
  19. var rwdList = args as List<KindItem>;
  20. Context.UI.OpenAsync(UIKeys.ItemGetItemPanel, rwdList);
  21. }
  22. }
  23. }