mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +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
|
|
@ -34,14 +34,7 @@ function(ProtocolHelper, GameController) {
|
|||
console.log('connected.')
|
||||
this.join('dungeon');
|
||||
}
|
||||
/*
|
||||
Networker.prototype.onMessage = function(message) {
|
||||
var self = this;
|
||||
ProtocolHelper.runCommands(message, function(command, options) {
|
||||
self.processControlCommand(command, options);
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
Networker.prototype.onDisconnect = function() {
|
||||
if(this.gameController) this.gameController.destruct();
|
||||
this.gameController = null;
|
||||
|
|
@ -52,14 +45,11 @@ function(ProtocolHelper, GameController) {
|
|||
this.sendCommand('join', channelName);
|
||||
}
|
||||
|
||||
Networker.prototype.sendCommand = function(command, options) {
|
||||
var message = ProtocolHelper.encodeCommand(command, options);
|
||||
this.socketLink.send(message);
|
||||
}
|
||||
/*
|
||||
|
||||
Networker.prototype.onJoinSuccess = function(options) {
|
||||
this.gameController = new GameController(options.id);
|
||||
this.gameController.loadLevel("default.json")
|
||||
this.gameController.loadLevel("default.json");
|
||||
/*
|
||||
console.log("Joined " + options.channelName);
|
||||
|
||||
if (options.userIds && options.userIds.length > 0) {
|
||||
|
|
@ -67,6 +57,22 @@ function(ProtocolHelper, GameController) {
|
|||
this.gameController.userJoined(options.userIds[i])
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Networker.prototype.sendCommand = function(command, options) {
|
||||
var message = ProtocolHelper.encodeCommand(command, options);
|
||||
this.socketLink.send(message);
|
||||
}
|
||||
|
||||
/*
|
||||
Networker.prototype.onMessage = function(message) {
|
||||
var self = this;
|
||||
|
||||
ProtocolHelper.runCommands(message, function(command, options) {
|
||||
self.processControlCommand(command, options);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Networker.prototype.onUserJoined = function(userId) {
|
||||
|
|
|
|||
0
app/Game/Core/Control/InputController.js
Normal file → Executable file
0
app/Game/Core/Control/InputController.js
Normal file → Executable file
0
app/Game/Core/Player.js
Normal file → Executable file
0
app/Game/Core/Player.js
Normal file → Executable file
0
app/Game/Core/Protocol/Helper.js
Normal file → Executable file
0
app/Game/Core/Protocol/Helper.js
Normal file → Executable file
0
app/Game/Core/Protocol/Parser.js
Normal file → Executable file
0
app/Game/Core/Protocol/Parser.js
Normal file → Executable file
Loading…
Add table
Add a link
Reference in a new issue