ソースを参照

added arrow key support

master
mort 8年前
コミット
5298984331
1個のファイルの変更5行の追加1行の削除
  1. 5
    1
      es/game.js

+ 5
- 1
es/game.js ファイルの表示

@@ -424,12 +424,17 @@ export default class Game {

this.keymap = [];
this.keymap[87] = "up";
this.keymap[38] = "up";
this.keymap[83] = "down";
this.keymap[40] = "down";
this.keymap[65] = "left";
this.keymap[37] = "left";
this.keymap[68] = "right";
this.keymap[39] = "right";
this.keymap[32] = "shoot";
this.keymap[16] = "sprint";


this.entities = [];
this.animations = [];

@@ -456,7 +461,6 @@ export default class Game {
});

sock.on("despawn", (msg) => {
console.log(msg);
if (!this.entities[msg.id])
return;


読み込み中…
キャンセル
保存