mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
changed function( to function (
This commit is contained in:
parent
26f3d22db7
commit
7e5eeb0a27
36 changed files with 209 additions and 209 deletions
|
|
@ -3,7 +3,7 @@ define([
|
|||
"Game/Core/Protocol/Helper"
|
||||
],
|
||||
|
||||
function(Parent, ProtocolHelper) {
|
||||
function (Parent, ProtocolHelper) {
|
||||
|
||||
function User(socketLink, coordinator) {
|
||||
Parent.call(this, socketLink.id);
|
||||
|
|
@ -13,32 +13,32 @@ function(Parent, ProtocolHelper) {
|
|||
|
||||
var self = this;
|
||||
|
||||
socketLink.on('message', function(message){
|
||||
socketLink.on('message', function (message){
|
||||
self.onMessage(message);
|
||||
});
|
||||
socketLink.on('disconnect', function(){
|
||||
socketLink.on('disconnect', function (){
|
||||
self.onDisconnect();
|
||||
});
|
||||
}
|
||||
|
||||
User.prototype = Object.create(Parent.prototype);
|
||||
|
||||
User.prototype.setChannelProcess = function(channelProcess) {
|
||||
User.prototype.setChannelProcess = function (channelProcess) {
|
||||
this.channelProcess = channelProcess;
|
||||
}
|
||||
|
||||
User.prototype.onMessage = function(message){
|
||||
User.prototype.onMessage = function (message){
|
||||
var self = this;
|
||||
ProtocolHelper.runCommands(message, function(command, options){
|
||||
ProtocolHelper.runCommands(message, function (command, options){
|
||||
self.processControlCommand(command, options);
|
||||
});
|
||||
}
|
||||
|
||||
User.prototype.onDisconnect = function(){
|
||||
User.prototype.onDisconnect = function (){
|
||||
this.coordinator.removeUser(this);
|
||||
}
|
||||
|
||||
User.prototype.processControlCommand = function(command, options){
|
||||
User.prototype.processControlCommand = function (command, options){
|
||||
switch(command) {
|
||||
|
||||
case 'join':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue