Moved id into base entity

This commit is contained in:
Jeremiah Billmann
2013-07-06 13:49:30 -04:00
parent dbe1dd01ad
commit a366576031
3 changed files with 6 additions and 8 deletions
+3 -4
View File
@@ -81,9 +81,9 @@ window.GarageServerIO = (function (window, socketio) {
this.time = time;
}
function Entity() {
function Entity(id) {
this.updates = [];
this.id;
this.id = id;
this.currentState = {};
}
Entity.prototype = {
@@ -133,8 +133,7 @@ window.GarageServerIO = (function (window, socketio) {
};
function Player(id) {
Entity.call(this);
this.id = id;
Entity.call(this, id);
}
Player.prototype = Object.create(Entity.prototype);