From 94cb31f0681d96e923b2fba54abb8a156a7ca58e Mon Sep 17 00:00:00 2001 From: abejfehr Date: Fri, 13 Feb 2015 15:11:26 -0500 Subject: [PATCH 1/2] Fix wrong script imported --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0d10822..c4422e6 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ - + From 4c67554874f907ffd35eb8486876053e472fa936 Mon Sep 17 00:00:00 2001 From: sudden62 Date: Sun, 19 Apr 2015 22:05:12 -0400 Subject: [PATCH 2/2] Added WASD support --- scripts/modules/Keyboard.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/modules/Keyboard.js b/scripts/modules/Keyboard.js index a60d770..ba8e101 100644 --- a/scripts/modules/Keyboard.js +++ b/scripts/modules/Keyboard.js @@ -8,16 +8,16 @@ var Keyboard = (function() { else if(event.keyCode == 32) { mediator.publish('controls_key_space'); } - else if(event.keyCode == 37) { + else if(event.keyCode == 37 || event.keyCode == 65) { mediator.publish('controls_key_left'); } - else if(event.keyCode == 38) { + else if(event.keyCode == 38 || event.keyCode == 87) { mediator.publish('controls_key_up'); } - else if(event.keyCode == 39) { + else if(event.keyCode == 39 || event.keyCode == 68) { mediator.publish('controls_key_right'); } - else if(event.keyCode == 40) { + else if(event.keyCode == 40 || event.keyCode == 83) { mediator.publish('controls_key_down'); } else if(event.keyCode == 82) {