mac os use this command
[vagrant@localhost git]$ diff -u game_new.js game_old.js --- game_new.js 2016-12-11 08:17:10.604013030 +0900 +++ game_old.js 2016-12-11 08:17:10.605013028 +0900 @@ -4,9 +4,9 @@ // KEY_CODES = { - 13: 'enter', 32: 'space', 37: 'left', + 38: 'up', 39: 'right', 40: 'down', 70: 'f', @@ -392,7 +392,7 @@ this.vel.rot = 0; } - if (KEY_STATUS.spacr) { + if (KEY_STATUS.up) { var rad = ((this.rot-90) * Math.PI)/180; this.acc.x = 0.5 * Math.cos(rad); this.acc.y = 0.5 * Math.sin(rad); @@ -406,7 +406,7 @@ if (this.delayBeforeBullet > 0) { this.delayBeforeBullet -= delta; } - if (KEY_STATUS.enter) { + if (KEY_STATUS.space) { if (this.delayBeforeBullet <= 0) { this.delayBeforeBullet = 10; for (var i = 0; i < this.bullets.length; i++) { @@ -919,7 +919,7 @@ waiting: function () { Text.renderText(ipad ? 'Touch Sreen to Start' : 'Press Space to Start', 36, Game.canvasWidth/2 - 270, Game.canvasHeight/2); if (KEY_STATUS.space || window.gameStart) { - KEY_STATUS.space = false; // hack so we don't move right away + KEY_STATUS.space = false; // hack so we don't shoot right away window.gameStart = false; this.state = 'start'; }