diff --git a/client/garageserver.io.js b/client/garageserver.io.js index 535f2d6..ff8d882 100644 --- a/client/garageserver.io.js +++ b/client/garageserver.io.js @@ -81,12 +81,12 @@ window.GarageServerIO = (function (window, socketio) { this.time = time; } - function Player(id) { + function Entity(id) { this.updates = []; this.id = id; this.currentState = {}; } - Player.prototype = { + Entity.prototype = { anyUpdates: function () { return this.updates.length > 0; }, @@ -132,6 +132,13 @@ window.GarageServerIO = (function (window, socketio) { } }; + function Player(id) { + this.updates = []; + this.id = id; + this.currentState = {}; + } + Player.prototype = Object.create(Entity.prototype); + function PlayerController() { this.players = []; }