From 106a3cca3e3d926ac17cb915b38c04ca7a35f70d Mon Sep 17 00:00:00 2001 From: Jeremiah Billmann Date: Thu, 4 Jul 2013 10:51:56 -0400 Subject: [PATCH] Progress: #3 --- client/garageserver.io.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 = []; }