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