{ //Update controller. All update calls are made here public static void Update(GameTime gameTime) { if (!Program.game.IsActive) { GameStateController.SetGameState(GameStateController.States.Menu); } InputController.ManageInputs(gameTime); //Updates when game is in the Gameplay state if (GameStateController.GetGameState() == GameStateController.States.Gameplay) { GameStateController.IsInProgress = true; DeleteRedundant(); MoveEntities(gameTime); MonsterSpawner.SpawnMonsters(gameTime); WeaponController.Run(gameTime); CheckCollisions(); } //Updates when game is in the Menu state else if (GameStateController.GetGameState() == GameStateController.States.Menu) { MenuController.CheckStates(); } }
//Marks enemy as removable and calls "onDeath" functions public new void Remove() { ShouldBeRemoved = true; SpawnAbility(); Actors.DeadBodies.Add(new DeadBody(this)); MonsterSpawner.LowerRespawnTime(400); ScoreController.Add((int)value); }