This commit is contained in:
Jeremiah Billmann
2013-07-04 11:01:54 -04:00
parent 106a3cca3e
commit 24fb6e5358
+6 -6
View File
@@ -13,13 +13,13 @@ function GarageServerGame(options) {
}
GarageServerGame.prototype.updateState = function (options) {
this.updatePlayers(options);
this.updateEntities(options);
var currentTime = new Date().getTime() - this.startTime;
this.updatePlayers(currentTime, options);
this.updateEntities(currentTime, options);
};
GarageServerGame.prototype.updatePlayers = function (options) {
var currentTime = new Date().getTime() - this.startTime,
state = { time: currentTime, playerStates: [] };
GarageServerGame.prototype.updatePlayers = function (currentTime, options) {
var state = { time: currentTime, playerStates: [], entityStates: [] };
this.players.forEach(function (player) {
state.playerStates.push([ player.client.id, player.state, player.sequence ]);
@@ -30,7 +30,7 @@ GarageServerGame.prototype.updatePlayers = function (options) {
});
};
GarageServerGame.prototype.updateEntities = function (options) {
GarageServerGame.prototype.updateEntities = function (currentTime, options) {
};