preliminary spawning of other players

This commit is contained in:
Logsol 2013-01-04 22:59:29 +01:00
parent c4c48ab821
commit a10a7a7319
3 changed files with 30 additions and 20 deletions

View file

@ -45,8 +45,10 @@
Channel.prototype.addUser = function (userId) {
var user = new User(userId, this);
var others = Object.keys(this.users);
this.users[user.id] = user;
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", {userId: user.id, channelName: this.name});
NotificationCenter.trigger('user/' + user.id + "/joinSuccess", {userId: user.id, channelName: this.name, others: others});
NotificationCenter.trigger('user/joined', user);
}