added debug information when users join

This commit is contained in:
Jeena Paradies 2012-07-13 19:53:07 +02:00
parent bffb16e77c
commit e37d1eeb2e
2 changed files with 25 additions and 2 deletions

View file

@ -52,8 +52,14 @@ define(["Protocol/Helper", "Chuck/ClientGame"], function(ProtocolHelper, ClientG
Networker.prototype.onJoinSuccess = function(channelName) {
this.clientGame = new ClientGame(this);
this.clientGame.loadLevel("default.json")
console.log("Joined " + channelName);
}
Networker.prototype.onUserJoined = function(userId) {
//this.clientGame.userJoined(userId);
console.log("User " + userId + " joined");
};
Networker.prototype.processControlCommand = function(command, options){
switch(command) {
case 'joinSuccess':
@ -64,6 +70,10 @@ define(["Protocol/Helper", "Chuck/ClientGame"], function(ProtocolHelper, ClientG
this.clientGame.processGameCommand(options);
break;
case 'userJoined':
this.onUserJoined(options);
break;
default:
break;
}