public void startGameMode() { gameMode = new GameMode(this); activeScreen = Screen.GameMode; startScreen = null; gameOverScreen = null; }
public void GameOver() { gameOverScreen = new GameOverScreen(this, SpriteBatch, Sprite); activeScreen = Screen.GameOverScreen; gameMode = null; List<GameComponent>toRemove = new List<GameComponent>(); foreach (GameComponent component in Components) { if (component is Wall || component is Trap || component is Coin || component is Lens || component is Player || component is Sounds || component is HUD || component is Goal || component is Stalker)toRemove.Add(component); } foreach (GameComponent gameComponent in toRemove) { Components.Remove(gameComponent); } }