mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
working towards usable new structure
This commit is contained in:
parent
3afc2fa66e
commit
815c63009f
15 changed files with 223 additions and 84 deletions
|
|
@ -7,7 +7,6 @@ define([
|
|||
function(Engine, Level, Player) {
|
||||
|
||||
function GameController(physicsEngine) {
|
||||
console.log('constructor called');
|
||||
this.players = {};
|
||||
|
||||
if (! physicsEngine instanceof Engine) {
|
||||
|
|
@ -30,12 +29,16 @@ function(Engine, Level, Player) {
|
|||
this.level.loadLevelInToEngine();
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
GameController.prototype.destroy = function() {
|
||||
for(var player in this.players) {
|
||||
this.players[player].destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
GameController.prototype.userJoined = function(user) {
|
||||
var player = new Player(user.id, this.physicsEngine);
|
||||
this.players[user.id] = player;
|
||||
|
|
@ -48,5 +51,7 @@ function(Engine, Level, Player) {
|
|||
delete this.players[user.id];
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
return GameController;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue