Skip to content

Use WasKeyJustPressed for ExitOnEscape#268

Open
IvanJoskic wants to merge 1 commit intoMonoGame:mainfrom
IvanJoskic:remove_is_key_down
Open

Use WasKeyJustPressed for ExitOnEscape#268
IvanJoskic wants to merge 1 commit intoMonoGame:mainfrom
IvanJoskic:remove_is_key_down

Conversation

@IvanJoskic
Copy link
Copy Markdown
Contributor

@IvanJoskic IvanJoskic commented May 9, 2026

Use WasKeyJustPressed instead of IsKeyDown which causes issues later in the tutorial. Following the tutorial, going from 16-Working-With-Sprite-Fonts to 17-Scenes, we will reach a state that causes the title screen to be skipped on Escape press. A single Esc press exits the game completely instead of going to the title screen. This was also mentioned in #228 (bullet point 4).

There is a demo branch on my fork.

The source code for 17-Scenes from MonoGame.Samples already has this change. But the tutorial never mentions this change.

Related PR on samples: MonoGame/MonoGame.Samples#120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant