mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
extended client server communication
This commit is contained in:
parent
94f63fc7b2
commit
81d2aa4ddc
12 changed files with 156 additions and 86 deletions
|
|
@ -1,13 +0,0 @@
|
|||
define(["Chuck/Processor"], function(Processor){
|
||||
var Chuck = {};
|
||||
|
||||
Chuck.init = function(){
|
||||
var processor = new Processor();
|
||||
}
|
||||
|
||||
Chuck.processGameCommand = function(package){
|
||||
console.log(package);
|
||||
}
|
||||
|
||||
return Chuck;
|
||||
});
|
||||
17
lib/Chuck/Game.js
Normal file
17
lib/Chuck/Game.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
define(["Chuck/Processor"], function(Processor){
|
||||
|
||||
function Game(networker){
|
||||
this.networker = networker;
|
||||
this.processor = new Processor();
|
||||
}
|
||||
|
||||
Game.prototype.processGameCommand = function(command, options){
|
||||
console.log('(not implemented) processGameCommand:', command, options);
|
||||
}
|
||||
|
||||
Game.prototype.destruct = function(){
|
||||
this.processor.destruct();
|
||||
}
|
||||
|
||||
return Game;
|
||||
});
|
||||
|
|
@ -104,5 +104,9 @@ define(requires, function(PhysicsEngine, Player, InputControlUnit, Settings, Box
|
|||
}
|
||||
}
|
||||
|
||||
Processor.prototype.destruct = function() {
|
||||
|
||||
}
|
||||
|
||||
return Processor;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue