LevelChoosePanel.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Excel2Json;
  2. using Fort23.Core;
  3. using Fort23.UTool;
  4. namespace Fort23.Mono
  5. {
  6. [UIBinding(prefab = "LevelChoosePanel")]
  7. public partial class LevelChoosePanel : UIPanel
  8. {
  9. private void Init()
  10. {
  11. }
  12. protected override void AddEvent()
  13. {
  14. }
  15. protected override void DelEvent()
  16. {
  17. }
  18. public override void AddButtonEvent()
  19. {
  20. }
  21. public async void CustomInit()
  22. {
  23. WorldMapConfig worldMapConfig = ConfigComponent.Instance.Get<WorldMapConfig>(1);
  24. BigMapItem bigMapItem = new BigMapItem();
  25. GameObjectPool gameObjectPool2 = await GObjectPool.Instance.FetchAsync<GameObjectPool>(worldMapConfig.bigMapPrefabName + ".prefab");
  26. bigMapItem.CustomInit(worldMapConfig.ID, gameObjectPool2);
  27. }
  28. public async static CTask OpenPanel()
  29. {
  30. LevelChoosePanel levelChoosePanel = await UIManager.Instance.LoadAndOpenPanel<LevelChoosePanel>(null);
  31. levelChoosePanel.CustomInit();
  32. }
  33. }
  34. }