feat: 提交资源
This commit is contained in:
19
assets/hall/scripts/GameEntry.ts
Normal file
19
assets/hall/scripts/GameEntry.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/* eslint-disable no-console */
|
||||
import { _decorator, Component, profiler } from "cc";
|
||||
|
||||
import { SingletonRegistry } from "@max-studio/core/Singleton";
|
||||
import UIManager from "@max-studio/core/ui/UIManager";
|
||||
import { ResManager } from "@max-studio/core/res/ResManager";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass("GameEntry")
|
||||
export class GameEntry extends Component {
|
||||
protected async onLoad() {
|
||||
await ResManager.getInstance().loadLocalBundle("games");
|
||||
await SingletonRegistry.initializeAutoInstances();
|
||||
void UIManager.getInstance().openUI("MainUI");
|
||||
}
|
||||
|
||||
update(deltaTime: number) {}
|
||||
}
|
||||
9
assets/hall/scripts/GameEntry.ts.meta
Normal file
9
assets/hall/scripts/GameEntry.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "85841fbd-bb85-4def-8585-384e63e0261c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user