Now let's get right into the important stuff. First we'll define a couple of methods on
Character. Then we'll rebuild
InputManager to handle key events instead of mouse events and integrate that with our game.
1for right) and
keyDown, which is a Boolean value that tells us if the player is pressing the key.
directionparameter in combination with
setScl(used to scale objects). The idea is that if you scale a sprite by a negative factor, it flips in the direction of the scaled component, so what we're doing ...