123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { BattleEventManager } from "../../tower/base/BattleEventManager";
- import { BattleControl } from "../../tower/control/BattleControl";
- import { ZombieMapData } from "../data/ZombieMapData";
- import { ZombieBuffControl } from "./ZombieBuffControl";
- import { ZombieEnemyControl } from "./ZombieEnemyControl";
- import { ZombieHeroControl } from "./ZombieHeroControl";
- import { ZombieSkillControl } from "./ZombieSkillControl";
- export class ZombieBattleControl extends BattleControl{
- map:ZombieMapData = null
-
- heroControl:ZombieHeroControl = null
-
- enemyControl:ZombieEnemyControl = null
-
- buffControl:ZombieBuffControl = null
- private static instanceZombie:ZombieBattleControl;
- static GetInstance():ZombieBattleControl{
- if(!ZombieBattleControl.instanceZombie){
- ZombieBattleControl.instanceZombie = new ZombieBattleControl();
- }
- return ZombieBattleControl.instanceZombie;
- }
-
- init(mapId:number){
- this.battleEventManager = BattleEventManager.instance
- this.map = ZombieMapData.GetInstance()
- this.heroControl = new ZombieHeroControl()
- this.enemyControl = new ZombieEnemyControl()
- this.buffControl = new ZombieBuffControl()
- this.map.init(mapId)
- this.buffControl.init()
- this.heroControl.init()
- this.enemyControl.init()
- ZombieSkillControl.GetInstance().init()
-
-
-
-
-
-
-
-
- }
- reset(mapId:number){
- this.clear()
- this.map.reset(mapId)
- this.buffControl.init()
- this.heroControl.init()
- this.enemyControl.init()
-
- }
- }
|