mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
working towards usable new structure
This commit is contained in:
parent
3afc2fa66e
commit
815c63009f
15 changed files with 223 additions and 84 deletions
|
|
@ -3,24 +3,28 @@ define([
|
|||
"Game/Client/Physics/Engine",
|
||||
"Game/Client/View/ViewController",
|
||||
"Game/Client/Control/KeyboardController",
|
||||
"Game/Core/NotificationCenter",
|
||||
"Lib/Utilities/RequestAnimFrame"
|
||||
],
|
||||
|
||||
function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimFrame) {
|
||||
function(Parent, PhysicsEngine, ViewController, KeyboardController, NotificationCenter, requestAnimFrame) {
|
||||
|
||||
function GameController () {
|
||||
this.viewController = new ViewController();
|
||||
|
||||
Parent.call(this, new PhysicsEngine());
|
||||
|
||||
this.me = null;
|
||||
this.keyboardController = null;
|
||||
|
||||
this.viewController = new ViewController();
|
||||
this.update();
|
||||
//NotificationCenter.on('me/joined', this.meJoined, this)
|
||||
|
||||
//this.update();
|
||||
}
|
||||
|
||||
GameController.prototype = Object.create(Parent.prototype);
|
||||
|
||||
|
||||
/*
|
||||
GameController.prototype.getMe = function() {
|
||||
return this.me;
|
||||
}
|
||||
|
|
@ -40,6 +44,7 @@ function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimF
|
|||
|
||||
GameController.prototype.meJoined = function(user) {
|
||||
this.me = this.userJoined(user);
|
||||
|
||||
this.keyboardController = new KeyboardController(this.me, this);
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +71,6 @@ function(Parent, PhysicsEngine, ViewController, KeyboardController, requestAnimF
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
return GameController;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue