import { _decorator, Component, Node, } from 'cc'; import { gameManager } from './gameManager'; const { ccclass, property } = _decorator; @ccclass('game') export class game extends Component { @property(Node) g_gameManager; @property(Node) uiLayer; @property(Node) topLayer; @property(Node) waitLayer; protected start(): void { gameManager.setUiLayer(this.uiLayer); gameManager.setTopLayer(this.topLayer); gameManager.setWaitLayer(this.waitLayer); this.schedule(()=>{ if(gameManager.isFinishLoad){ gameManager.PreloadingLevelImg(()=>{ console.log("新关卡资源加载完成") }) } },2); } }