Newer
Older
DungeonShooting / DungeonShooting_Godot / src / framework / ui / UiManager.cs
@lijincheng lijincheng on 6 Mar 2023 432 bytes UI框架接口,还有一个样例
  1.  
  2. using Godot;
  3.  
  4. public static partial class UiManager
  5. {
  6. private static bool _init = false;
  7. public static void Init()
  8. {
  9. if (_init)
  10. {
  11. return;
  12. }
  13.  
  14. _init = true;
  15. }
  16.  
  17. public static UiBase OpenUi(string resourcePath)
  18. {
  19. return null;
  20. }
  21.  
  22. public static T OpenUi<T>(string resourcePath) where T : UiBase
  23. {
  24. return (T)OpenUi(resourcePath);
  25. }
  26. }