/// <summary> /// Handles updating the mode selection screen /// </summary> public static void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Check if 1 was pressed if (HandleInput.WasKeyPressed(Keys.D1)) { // Update the scene to the classic gameplay screen GameBase.State = GameBase.GameState.ClassicGameplay; } // Check if 2 was pressed else if (HandleInput.WasKeyPressed(Keys.D2)) { // Update the scene to the free gameplay screen GameBase.State = GameBase.GameState.FreeGameplay; } // Check if 3 was pressed else if (HandleInput.WasKeyPressed(Keys.D3)) { // Update the scene to the main menu screen GameBase.State = GameBase.GameState.MainMenu; } }
/// <summary> /// Handles updating the main menu selection screen /// </summary> public static void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Check if 1 was pressed if (HandleInput.WasKeyPressed(Keys.D1)) { // Update the scene to the mode selection screen GameBase.State = GameBase.GameState.ModeSelection; } // Check if 2 was pressed else if (HandleInput.WasKeyPressed(Keys.D2)) { // Update the scene to the instructions screen GameBase.State = GameBase.GameState.Instructions; } // Check if 3 was pressed else if (HandleInput.WasKeyPressed(Keys.D3)) { // Update the scene to the instructions screen GameBase.Instance.Exit(); } }
/// <summary> /// Updates all classes regarding gameplay processes /// </summary> public void Update() { // Update the HandleInput so that the HandleInput state doesn't bleed into the base update loop // I.E pressing 1 in the main menu screen leads to updating the mode selection screen // with unupdated HandleInputs meaning that 1 is still perceived to be pressed HandleInput.Update(); // Update all gameplay processes PlayerStatus.Update(); EntityManager.Update(); EnemySpawner.Update(); GameBase.ParticleManager.Update(); }