mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
45 lines
No EOL
950 B
JavaScript
Executable file
45 lines
No EOL
950 B
JavaScript
Executable file
define([
|
|
"Game/Core/User",
|
|
"Game/Core/Protocol/Helper",
|
|
"Game/Core/NotificationCenter"
|
|
],
|
|
|
|
function (Parent, ProtocolHelper, NotificationCenter) {
|
|
|
|
function User(id, coordinator) {
|
|
Parent.call(this, id);
|
|
this.id = socketLink.id;
|
|
this.socketLink = socketLink;
|
|
this.coordinator = coordinator;
|
|
this.channel = null;
|
|
|
|
this.init(socketLink);
|
|
}
|
|
|
|
User.prototype = Object.create(Parent.prototype);
|
|
|
|
User.prototype.init = function (socketLink){
|
|
|
|
var self = this;
|
|
|
|
}
|
|
/*
|
|
User.prototype.setChannel = function (channel) {
|
|
this.channel = channel;
|
|
}
|
|
|
|
User.prototype.sendCommand = function (command, options) {
|
|
|
|
var message = ProtocolHelper.encodeCommand(command, options);
|
|
this.socketLink.send(message);
|
|
}
|
|
|
|
|
|
|
|
User.prototype.toString = function () {
|
|
return "[User " + this.id + "]";
|
|
};
|
|
*/
|
|
return User;
|
|
|
|
}); |