mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-08-05 12:40:47 +08:00
Progress: #3
This commit is contained in:
@@ -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 = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user