MyApp.ts 548 B

123456789101112131415161718
  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. import { UIType } from './GameFrameWork/UIBase';
  6. const { ccclass, property } = _decorator;
  7. @ccclass('MyApp')
  8. export class MyApp extends Component {
  9. protected async onLoad(){
  10. await resMgr.loadAllRes("Res");
  11. await resMgr.loadAllRes("UI");
  12. await dataMgr.loadDataDir("Data");
  13. UIMgr.openUI("Start",UIType.PAGE);
  14. }
  15. }