add users on join

This commit is contained in:
Jeena Paradies 2012-07-13 23:39:07 +02:00
parent e43fbc5223
commit e751210345
2 changed files with 9 additions and 1 deletions

View file

@ -53,6 +53,12 @@ define(["Protocol/Helper", "Chuck/ClientGame"], function(ProtocolHelper, ClientG
this.clientGame = new ClientGame(this, options.id);
this.clientGame.loadLevel("default.json")
console.log("Joined " + options.channelName);
if (options.userIds && options.userIds.length > 0) {
for(var i = 0; i < options.userIds.length; i++) {
this.clientGame.userJoined(options.userIds[i])
}
}
}
Networker.prototype.onUserJoined = function(userId) {