update of client data by server

This commit is contained in:
Jeena Paradies 2012-07-13 22:49:15 +02:00
parent 2cb401bbd3
commit c8d0a48489
11 changed files with 239 additions and 120 deletions

View file

@ -9,8 +9,8 @@ define(["Chuck/Processors/ServerProcessor"], function(ServerProcessor) {
this.serverProcessor.loadLevel(path);
}
ServerGame.prototype.processGameCommand = function(command, options) {
console.log('(not implemented) processGameCommand:', command, options);
ServerGame.prototype.progressGameCommandFromUser = function(command, options, user) {
this.serverProcessor.progressGameCommandFromId(command, options, user.id);
}
ServerGame.prototype.destruct = function() {
@ -22,7 +22,7 @@ define(["Chuck/Processors/ServerProcessor"], function(ServerProcessor) {
}
ServerGame.prototype.updateClientsWorld = function(update_world) {
this.channel.sendCommandToAllUsers('gameCommand', update_world);
this.channel.sendCommandToAllUsers('gameCommand', {worldUpdate: update_world});
}
return ServerGame;