working towards usable new structure

This commit is contained in:
logsol 2012-07-22 17:54:27 +02:00
parent 3afc2fa66e
commit 815c63009f
15 changed files with 223 additions and 84 deletions

View file

@ -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;
});