123456789101112131415161718192021222324 |
- import { _decorator, Component, instantiate, Node, Prefab } from 'cc';
- import { resMgr } from '../../Frames/ResourcesMgr';
- import { ModulerBase } from './ModulerBase';
- const { ccclass, property } = _decorator;
- @ccclass('MonsterMgr')
- export class MonsterMgr extends ModulerBase {
- @property(Prefab)
- monsterPre: Prefab = null;
- start() {
- //this.monsterPre = resMgr.getPrefab("Monster");
- this.schedule(()=>{
- //const monster = instantiate(this.monsterPre);
- const monster = instantiate(resMgr.getPrefab("Monster"));
- monster.parent = this.node;
- }, 2)
- }
- update(deltaTime: number) {
-
- }
- }
|