mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
preliminary spawning of other players
This commit is contained in:
parent
c4c48ab821
commit
a10a7a7319
3 changed files with 30 additions and 20 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue