import { _decorator, Component, Constructor, Node } from 'cc'; import { GameMgr } from './GameMgr'; const { ccclass, property } = _decorator; @ccclass('ModulerBase') export class ModulerBase extends Component { init(){ } //刷新 refresh(){ } //获取管理者中的其他模块 getModuler(type: Constructor): T{ return GameMgr.Instance.getModuler(type); } //销毁自己 removeSelf(){ this.node.destroy(); this.clearSelf(); } protected clearSelf(){ } }