123456789101112131415161718192021222324252627282930 |
- import { _decorator, instantiate, Prefab, Vec3 } from 'cc';
- import { ModulerBase } from './ModulerBase';
- import { GameMgr } from './GameMgr';
- import { MapMgr } from './MapMgr';
- import { resMgr } from '../../Frames/ResourcesMgr';
- const { ccclass, property } = _decorator;
- @ccclass('TowerMgr')
- export class TowerMgr extends ModulerBase {
- @property(Prefab)
- pre: Prefab = null;
- start() {
- //GameMgr.Instance.getModuler(MapMgr).test();
- //this.getModuler(MapMgr).test();
- }
- creatTower(pos: Vec3){
- const node = instantiate(this.pre);
- //const node = instantiate(resMgr.getPrefab("Tower"));
- node.setPosition(pos);
- node.parent = this.node;
- }
- protected clearSelf(): void {
-
- }
- update(deltaTime: number) {
-
- }
- }
|