improve keyboard input

This commit is contained in:
Asraelite 2016-03-30 01:25:14 +01:00
parent e9d1596c2f
commit 9533184a94
9 changed files with 49 additions and 16 deletions

View file

@ -14,6 +14,12 @@ class Player {
this.delta = [];
this.chatCooldown = 0;
this.inputInterface = [
'thrust',
'aim',
'fire'
];
}
disconnect() {

View file

@ -115,6 +115,7 @@ class Room {
sendWorld(player) {
let data = {
playerShipId: player.ship.id,
inputInterface: player.inputInterface,
bounds: this.world.bounds,
tps: this.tps,
bodies: Array.from(this.world.bodies).map(b => b.packFull())