Update Keyboard.js

This commit is contained in:
Alex Mourtziapis 2015-06-15 04:33:40 +03:00
parent 4cc3777d36
commit 9d16e3e9a0

View file

@ -169,15 +169,13 @@ Phaser.Keyboard.prototype = {
addKeys: function (keycodes,hotkeys){
var result = "{";
for(var i = 0; i < hotkeys.length; i++){
result += hotkeys[i] + ": this.addKey(" + keycodes[i] + ")";
if(i !== ( hotkeys.length-1 ))
result += ",";
}
result += "}";
//eval here should be quite safe.
return(eval("(" + result + ")"));
},