public override Zombie Generate() { Zombie zombie = new Zombies.Spiders.GiantSpider(this.Game); this.ZombiesManager.Add(zombie, GRandom.RandomInt(0, this.ZombiesManager.Grid.NumberOfRows)); return zombie; }
public override void Update(GameTime gameTime) { switch (this.state) { case GameSceneState.MoveIn: case GameSceneState.MoveOut: this.Background.Update(gameTime); this.moveTimer.Update(gameTime); break; case GameSceneState.Choosing: this.GrowManager.Update(gameTime); this.playButton.Update(gameTime); break; case GameSceneState.Play: this.GrowManager.Update(gameTime); this.Grid.Update(gameTime);; this.PlantManager.Update(gameTime); this.ZombiesManager.Update(gameTime); if (GMouse.IsRightButtonClicked) { Zombie zombie = new Zombies.Spiders.GiantSpider(this.Game); zombie.Position = GMouse.MousePosition; this.ZombiesManager.Add(zombie); } break; } if (this.IsEndScene()) this.ShowNextScene(); base.Update(gameTime); }
public override Zombie Generate() { Zombie zombie = null; switch (GRandom.RandomInt(3)) { case 0: zombie = new Zombies.Spiders.GiantSpider(this.Game); break; case 1: zombie = new Zombies.Skeletons.BarrowWight(this.Game); break; case 2: zombie = new Zombies.Zombies.Nupperibo(this.Game); break; }; this.ZombiesManager.Add(zombie, GRandom.RandomInt(0, this.ZombiesManager.Grid.NumberOfRows)); return zombie; }