Skip to content

Commit cc9822c

Browse files
Merge pull request #60 from AristurtleDev/feedback/chapter-23
Chapter 23 Feedback
2 parents bed9c0f + bf5c6b7 commit cc9822c

File tree

2 files changed

+12
-2
lines changed
  • articles/tutorials/building_2d_games/23_completing_the_game

2 files changed

+12
-2
lines changed

articles/tutorials/building_2d_games/23_completing_the_game/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,13 @@ Implementing the input buffering technique we introduced in [Chapter 10](../10_h
315315

316316
### Implementing Input Buffering in the Slime Class
317317

318-
To add input buffering for the `Slime` class, we will begin by adding the necessary fields to store our input queue.
318+
For the `Slime` class, we will implement input buffering based on the example given using a `Queue<T>` in [Chapter 10](../10_handling_input/index.md#implementing-a-simple-input-buffer). In the `GameObject` folder of the `DungeonSlime` project (your main game project), open the `Slime.cs` file so we can make the changes.
319319

320-
In the `GameObjects` directory of the *DungeonSlime* project (your main game project), open the `Slime.cs` file and add the following fields after the `_sprite` field:
320+
First, update the using statements at the top of the `Slime` class to add the `System.Linq` using statement:
321+
322+
[!code-csharp[](./snippets/slime/usings.cs?highlight=3)]
323+
324+
Next, add the following fields to the `Slime` class after the `_sprite` field:
321325

322326
[!code-csharp[](./snippets/slime/fields.cs)]
323327

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using Microsoft.Xna.Framework;
5+
using MonoGameLibrary;
6+
using MonoGameLibrary.Graphics;

0 commit comments

Comments
 (0)