mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
first attempt to implement GameObject
This commit is contained in:
parent
aa30a23ca1
commit
fe0d4a66e2
14 changed files with 328 additions and 129 deletions
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue