diff --git a/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/Core.cs index bf6d551c..2d52b1e4 100644 --- a/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/11-Input-Management/MonoGameLibrary/Core.cs @@ -112,7 +112,7 @@ protected override void Update(GameTime gameTime) // Update the input manager Input.Update(gameTime); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/Core.cs index d33570a4..0ae73903 100644 --- a/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/12-Collision-Detection/MonoGameLibrary/Core.cs @@ -112,7 +112,7 @@ protected override void Update(GameTime gameTime) // Update the input manager Input.Update(gameTime); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/Core.cs index d33570a4..0ae73903 100644 --- a/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/13-Tilemap/MonoGameLibrary/Core.cs @@ -112,7 +112,7 @@ protected override void Update(GameTime gameTime) // Update the input manager Input.Update(gameTime); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/Core.cs index d33570a4..0ae73903 100644 --- a/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/14-SoundEffects-And-Music/MonoGameLibrary/Core.cs @@ -112,7 +112,7 @@ protected override void Update(GameTime gameTime) // Update the input manager Input.Update(gameTime); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/Core.cs index 5be33b6e..c44ea357 100644 --- a/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/15-Audio-Controller/MonoGameLibrary/Core.cs @@ -132,7 +132,7 @@ protected override void Update(GameTime gameTime) // Update the audio controller. Audio.Update(); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/Core.cs b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/Core.cs index 5be33b6e..c44ea357 100644 --- a/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/Core.cs +++ b/Tutorials/learn-monogame-2d/src/16-Working-With-SpriteFonts/MonoGameLibrary/Core.cs @@ -132,7 +132,7 @@ protected override void Update(GameTime gameTime) // Update the audio controller. Audio.Update(); - if (ExitOnEscape && Input.Keyboard.IsKeyDown(Keys.Escape)) + if (ExitOnEscape && Input.Keyboard.WasKeyJustPressed(Keys.Escape)) { Exit(); } diff --git a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/Scenes/GameScene.cs b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/Scenes/GameScene.cs index 3f7851bd..05f5c9a0 100644 --- a/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/Scenes/GameScene.cs +++ b/Tutorials/learn-monogame-2d/src/17-Scenes/DungeonSlime/Scenes/GameScene.cs @@ -249,11 +249,11 @@ private void AssignRandomBatVelocity() private void CheckKeyboardInput() { - // Get a reference to the keyboard inof + // Get a reference to the keyboard info KeyboardInfo keyboard = Core.Input.Keyboard; // If the escape key is pressed, return to the title screen - if (Core.Input.Keyboard.WasKeyJustPressed(Keys.Escape)) + if (keyboard.WasKeyJustPressed(Keys.Escape)) { Core.ChangeScene(new TitleScene()); }