2014 | OriginalPaper | Chapter
6. Reacting to Player Input
Published in:
Building JavaScript Games
Abstract
In this chapter, you see how your game program can react to button presses. In order to do this, you need an instruction called if that executes an instruction (or a group of instructions) when a condition is met. You also learn to structure your code a bit more into objects and methods.