MyApp.ts 557 B

12345678910111213141516171819202122232425
  1. import { _decorator, Component, Node } from 'cc';
  2. import { UIMgr } from '../Frames/UIManager';
  3. import { resMgr } from '../Frames/ResourcesMgr';
  4. import { dataMgr } from '../Frames/DataManager';
  5. const { ccclass, property } = _decorator;
  6. @ccclass('MyApp')
  7. export class MyApp extends Component {
  8. protected async onLoad(){
  9. UIMgr.openUI("Start");
  10. await resMgr.loadAllRes("Res");
  11. await resMgr.loadAllRes("UI");
  12. await dataMgr.loadDataDir("Data");
  13. }
  14. start() {
  15. }
  16. update(deltaTime: number) {
  17. }
  18. }