improve keyboard input
This commit is contained in:
parent
e9d1596c2f
commit
9533184a94
9 changed files with 49 additions and 16 deletions
|
@ -14,6 +14,12 @@ class Player {
|
|||
this.delta = [];
|
||||
|
||||
this.chatCooldown = 0;
|
||||
|
||||
this.inputInterface = [
|
||||
'thrust',
|
||||
'aim',
|
||||
'fire'
|
||||
];
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue