Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down