groundwork GameController

This commit is contained in:
Jeena Paradies 2012-07-22 01:08:21 +02:00
parent c27f4e1e95
commit 9864f8cb57
2 changed files with 3 additions and 3 deletions

View file

@ -32,12 +32,12 @@ function(Engine, Level, ) {
for(var player in this.players) {
this.players[player].destroy();
}
delete this.players;
}
GameController.prototype.userJoined = function(user) {
var player = new Player(this.physicsEngine, id);
var player = new Player(id, this.physicsEngine);
this.players[user.id] = player;
return player;
}
GameController.prototype.userLeft = function(user) {

View file

@ -5,7 +5,7 @@ define([
function(Doll, Settings) {
function Player (physicsEngine, id, repository) {
function Player (id, physicsEngine, repository) {
this.physicsEngine = physicsEngine;
this.id = id;
this.repository = repository;