This commit is contained in:
Jeremiah Billmann
2013-07-04 10:51:56 -04:00
parent 0204d254e6
commit 106a3cca3e
+9 -2
View File
@@ -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 = [];
}