Skip to content

Commit 6bf1bc4

Browse files
committed
Remove the exit check in game1
1 parent edd14b0 commit 6bf1bc4

File tree

2 files changed

+1
-4
lines changed
  • articles/tutorials/building_2d_games/11_input_management

2 files changed

+1
-4
lines changed

articles/tutorials/building_2d_games/11_input_management/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ The key changes to the `Core` class are:
372372

373373
Now let's update our `Game1` class to use the new input management system through the `Core` class. Open *Game1.cs* in the game project and update it to the following:
374374

375-
[!code-csharp[](./snippets/game1.cs?highlight=74,80,86,92,98,106,111,114,118,124,126-127,132,138,144,150)]
375+
[!code-csharp[](./snippets/game1.cs?highlight=71,77,83,89,95,103,108,111,115,121,123-124,129,135,141,147)]
376376

377377
The key changes to the `Game1` class are:
378378

articles/tutorials/building_2d_games/11_input_management/snippets/game1.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ protected override void LoadContent()
4949

5050
protected override void Update(GameTime gameTime)
5151
{
52-
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
53-
Exit();
54-
5552
// Update the slime animated sprite.
5653
_slime.Update(gameTime);
5754

0 commit comments

Comments
 (0)