mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 07:01:20 +00:00
Update Keyboard.js
This commit is contained in:
parent
4cc3777d36
commit
9d16e3e9a0
1 changed files with 1 additions and 3 deletions
|
@ -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 + ")"));
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue