UIConst.ts 863 B

12345678910111213141516171819202122232425262728293031323334
  1. import { _decorator, Component, Node } from 'cc';
  2. import { GUIManager } from '../../engines/gui/GUIManager';
  3. const { ccclass, property } = _decorator;
  4. export class UIConst extends Component {
  5. /**
  6. * 游戏准备界面
  7. */
  8. public static PREPARE_UI:number=0;
  9. /**
  10. * 战斗界面
  11. */
  12. public static FIGHTING_UI:number=1;
  13. /**
  14. * 游戏结算界面
  15. */
  16. public static GAME_OVER_UI:number=2;
  17. /**
  18. * 商城界面
  19. */
  20. public static SHOP_UI:number=3;
  21. //注册所有游戏UI
  22. static RegisterGUI():void{
  23. GUIManager.single.RegisterGUI(this.PREPARE_UI,"ui/PrepareUI");
  24. GUIManager.single.RegisterGUI(this.FIGHTING_UI,"ui/FightingUI");
  25. GUIManager.single.RegisterGUI(this.GAME_OVER_UI,"ui/GameOverUI");
  26. GUIManager.single.RegisterGUI(this.SHOP_UI,"ui/ShopUI");
  27. }
  28. }