wingbase/public/js/starbugs/world/ship.js
2016-03-22 00:42:48 +00:00

14 lines
316 B
JavaScript

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.
}
}
}