mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
replaced all tabs with 4 spaces
This commit is contained in:
parent
5d11540c55
commit
26f3d22db7
30 changed files with 1017 additions and 1011 deletions
38
app/Game/Core/Protocol/Helper.js
Normal file → Executable file
38
app/Game/Core/Protocol/Helper.js
Normal file → Executable file
|
|
@ -1,29 +1,29 @@
|
|||
define([
|
||||
"Game/Core/Protocol/Parser"
|
||||
"Game/Core/Protocol/Parser"
|
||||
],
|
||||
|
||||
function(Parser) {
|
||||
|
||||
var Helper = {}
|
||||
var Helper = {}
|
||||
|
||||
Helper.encodeCommand = function(command, options){
|
||||
return Parser.encode(Helper.assemble(command, options));
|
||||
}
|
||||
Helper.encodeCommand = function(command, options){
|
||||
return Parser.encode(Helper.assemble(command, options));
|
||||
}
|
||||
|
||||
Helper.assemble = function(command, options){
|
||||
var commands = {};
|
||||
commands[command] = options || null;
|
||||
return commands;
|
||||
}
|
||||
Helper.assemble = function(command, options){
|
||||
var commands = {};
|
||||
commands[command] = options || null;
|
||||
return commands;
|
||||
}
|
||||
|
||||
Helper.runCommands = function(message, callback){
|
||||
var commands = Parser.decode(message);
|
||||
|
||||
for(var command in commands) {
|
||||
callback(command, commands[command]);
|
||||
}
|
||||
}
|
||||
Helper.runCommands = function(message, callback){
|
||||
var commands = Parser.decode(message);
|
||||
|
||||
for(var command in commands) {
|
||||
callback(command, commands[command]);
|
||||
}
|
||||
}
|
||||
|
||||
return Helper;
|
||||
|
||||
return Helper;
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue