diff --git a/articles/tutorials/building_2d_games/11_input_management/snippets/game1.cs b/articles/tutorials/building_2d_games/11_input_management/snippets/game1.cs index af9fa1b7..81211f19 100644 --- a/articles/tutorials/building_2d_games/11_input_management/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/11_input_management/snippets/game1.cs @@ -50,6 +50,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -61,8 +64,6 @@ protected override void Update(GameTime gameTime) // Check for gamepad input and handle it. CheckGamePadInput(); - - base.Update(gameTime); } private void CheckKeyboardInput() diff --git a/articles/tutorials/building_2d_games/12_collision_detection/snippets/game1.cs b/articles/tutorials/building_2d_games/12_collision_detection/snippets/game1.cs index d92dab21..414e1547 100644 --- a/articles/tutorials/building_2d_games/12_collision_detection/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/12_collision_detection/snippets/game1.cs @@ -61,6 +61,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -175,8 +178,6 @@ protected override void Update(GameTime gameTime) // Assign a new random velocity to the bat AssignRandomBatVelocity(); } - - base.Update(gameTime); } private void AssignRandomBatVelocity() diff --git a/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/game1.cs b/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/game1.cs index e5535c60..f5c4e8ce 100644 --- a/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/13_working_with_tilemaps/snippets/game1.cs @@ -84,6 +84,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -185,8 +188,6 @@ protected override void Update(GameTime gameTime) // Assign a new random velocity to the bat AssignRandomBatVelocity(); } - - base.Update(gameTime); } private void AssignRandomBatVelocity() diff --git a/articles/tutorials/building_2d_games/14_soundeffects_and_music/snippets/game1.cs b/articles/tutorials/building_2d_games/14_soundeffects_and_music/snippets/game1.cs index 9069610f..7467e843 100644 --- a/articles/tutorials/building_2d_games/14_soundeffects_and_music/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/14_soundeffects_and_music/snippets/game1.cs @@ -113,6 +113,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -220,8 +223,6 @@ protected override void Update(GameTime gameTime) // Play the collect sound effect _collectSoundEffect.Play(); } - - base.Update(gameTime); } private void AssignRandomBatVelocity() diff --git a/articles/tutorials/building_2d_games/15_audio_controller/snippets/game1.cs b/articles/tutorials/building_2d_games/15_audio_controller/snippets/game1.cs index 3841f24c..6f084b23 100644 --- a/articles/tutorials/building_2d_games/15_audio_controller/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/15_audio_controller/snippets/game1.cs @@ -107,6 +107,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -214,8 +217,6 @@ protected override void Update(GameTime gameTime) // Play the collect sound effect. Audio.PlaySoundEffect(_collectSoundEffect); } - - base.Update(gameTime); } private void AssignRandomBatVelocity() diff --git a/articles/tutorials/building_2d_games/16_working_with_spritefonts/snippets/game1.cs b/articles/tutorials/building_2d_games/16_working_with_spritefonts/snippets/game1.cs index f0583f57..0b766493 100644 --- a/articles/tutorials/building_2d_games/16_working_with_spritefonts/snippets/game1.cs +++ b/articles/tutorials/building_2d_games/16_working_with_spritefonts/snippets/game1.cs @@ -131,6 +131,9 @@ protected override void LoadContent() protected override void Update(GameTime gameTime) { + // Update the InputManger inside base.Update() right away. + base.Update(gameTime); + // Update the slime animated sprite. _slime.Update(gameTime); @@ -241,8 +244,6 @@ protected override void Update(GameTime gameTime) // Increase the player's score. _score += 100; } - - base.Update(gameTime); } private void AssignRandomBatVelocity()