mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-19 11:19:49 +08:00
Progress #3
This commit is contained in:
@@ -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) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user