mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
groundwork GameController
This commit is contained in:
parent
c27f4e1e95
commit
9864f8cb57
2 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue