add start of ship controls
This commit is contained in:
parent
1027d980c1
commit
fcfe1e8790
10 changed files with 131 additions and 2 deletions
|
@ -2,4 +2,13 @@ function Ship(id) {
|
|||
this.id = id;
|
||||
this.x = 0;
|
||||
this.y = 0;
|
||||
this.move = [];
|
||||
this.lastMove = [];
|
||||
|
||||
this.updateMove = function() {
|
||||
if (JSON.stringify(this.move) != JSON.stringify(this.lastMove) || true) {
|
||||
game.net.update(this.move);
|
||||
this.lastMove = Array.apply(0, this.move); // Bloody Javascript.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue