Start.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. import { LQCollideSystem } from "./Collide/lq_collide_system/lq_collide_system";
  2. import { UIList } from "./Core/Ui/UIDef";
  3. import { UILayerNames, UILayers } from "./Core/Ui/UILayers";
  4. import { UIMgr } from "./Core/Ui/UIMgr";
  5. import bullet from "./game/bullet";
  6. import { ConfigMgr } from "./game/cfg/configMgr";
  7. import { Barrage } from "./game/nest/barrage";
  8. import { LevelMgr } from "./levelMgr";
  9. const {ccclass, property} = cc._decorator;
  10. @ccclass
  11. export default class Start extends cc.Component {
  12. /*===========================自动绑定组件开始===========================*/
  13. /*自动生成*/
  14. @property({type:cc.Node, displayName:""})
  15. private $ui_node:cc.Node = null;
  16. /*===========================自动绑定组件结束===========================*/
  17. /*===========================自动生成按钮事件开始==========================*/
  18. /*===========================自动生成按钮事件结束==========================*/
  19. constructor(){
  20. super();
  21. }
  22. protected async onLoad(): Promise<void> {
  23. UIMgr.inst.setup(this.$ui_node, UILayerNames.length, UILayerNames);
  24. // LQCollideSystem.is_enable = true;
  25. // cc.director.getPhysicsManager().enabled = true;
  26. // cc.director.getPhysicsManager().gravity = cc.v2(0, 0);
  27. // await ConfigMgr.inst.init();
  28. // LevelMgr.inst.parent = this.$level_node;
  29. // LevelMgr.inst.title = this.$levelTitle_lb
  30. // LevelMgr.inst.begin();
  31. // // this.testUI();
  32. // Barrage.inst.parent = this.$bulletLayer_node;
  33. // UIMgr.inst.showUI(UIList.debug);
  34. }
  35. private testUI() {
  36. UIMgr.inst.showUI(UIList.loading);
  37. UIMgr.inst.showUI(UIList.loading);
  38. setTimeout(() => {
  39. UIMgr.inst.hideUI(UIList.loading);
  40. }, 10000);
  41. }
  42. }