ashblue/canvas-prime — Issue #33: Key.press with multiple inputs
Author: thekoehl
Created: 2012-02-22 01:53:27+00:00
State: open

If we try to use multiple inputs we are only capturing one currently:

In player.js:

if (Key.press('arrowLeft') && this.x > 0)
this.x -= this.speed;
if (Key.press('arrowRight') && this.x < Game.width - this.width)
this.x += this.speed;
if (Key.press('arrowUp') && this.y > 0)
this.y -= this.speed;
if (Key.press('arrowDown') && this.y < Game.height - this.height)
this.y += this.speed;