// Start is called before the first frame update void Start() { ZombieWaveSpawnerState beinngerWave = new ZombieWaveSpawnerState(this, StateMachine) { ZombiesToSpawn = 5, NextState = SpawnerStateEnum.Complete }; StateMachine.AddState(SpawnerStateEnum.Beginner, beinngerWave); StateMachine.Initialize(SpawnerStateEnum.Beginner); }
void Start() { ZombieWaveSpawnerState beginnerWave = new ZombieWaveSpawnerState(this, StateMachine) { ZombiesToSpawn = 5, NextState = SpawnerStateEnum.Intermediate }; StateMachine.AddState(SpawnerStateEnum.Beginner, beginnerWave); ZombieWaveSpawnerState intermediateWave = new ZombieWaveSpawnerState(this, StateMachine) { ZombiesToSpawn = 10, NextState = SpawnerStateEnum.Complete }; StateMachine.AddState(SpawnerStateEnum.Intermediate, intermediateWave); StateMachine.Initialize(StartingState); }
// Start is called before the first frame update void Start() { stateMachine = GetComponent <SpawnerStateMachine>(); followObject = GameObject.FindGameObjectWithTag("Player"); ZombieWaveState beginningWave = new ZombieWaveState(this, stateMachine) { zombiesToSpawn = 10, nextState = SpawnerStateEnum.Complete }; stateMachine.AddState(SpawnerStateEnum.Beginner, beginningWave); stateMachine.Initialize(SpawnerStateEnum.Beginner); }
// Start is called before the first frame update void Start() { ZombieWaveSpawnerState beginnerWave = new ZombieWaveSpawnerState(this, StateMachine) { ZombiesToSpawn = 5, NextState = SpawnerStateEnum.Complete }; StateMachine.AddState(SpawnerStateEnum.Beginner, beginnerWave); StateMachine.Initialize(SpawnerStateEnum.Beginner); //for (int zombieCount = 0; zombieCount < NumberOfZombieToSpawn; zombieCount++) //{ // SpawnZombie(); //} }