first attempt to implement GameObject

This commit is contained in:
Jeena 2013-12-19 15:16:15 +01:00
parent aa30a23ca1
commit fe0d4a66e2
14 changed files with 328 additions and 129 deletions

View file

@ -8,7 +8,11 @@ function (Engine, Level, Player) {
function GameController (physicsEngine) {
this.players = {};
this.gameObjects = {
animated: [],
fixed: []
};
if (! physicsEngine instanceof Engine) {
throw physicsEngine + " is not of type Engine";
}
@ -25,7 +29,7 @@ function (Engine, Level, Player) {
this.level.unload();
}
this.level = new Level(path, this.physicsEngine);
this.level = new Level(path, this.physicsEngine, this.gameObjects);
this.level.loadLevelInToEngine();
}