mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
control features implemented
This commit is contained in:
parent
8d0ff1a929
commit
c2b0baaea2
10 changed files with 213 additions and 63 deletions
|
|
@ -11,19 +11,15 @@ Chuck.Processor = function() {
|
|||
}
|
||||
|
||||
Chuck.Processor.prototype.init = function() {
|
||||
|
||||
this._engine = new Chuck.Physics.Engine();
|
||||
|
||||
this._me = new Chuck.Player(this._engine, this._repository);
|
||||
|
||||
//this._camera = Camera.getInstance()
|
||||
this._me = new Chuck.Player(this._engine, this._repository);
|
||||
//this._camera = Camera.getInstance()
|
||||
//this._repository = Repository.getInstance();
|
||||
this._engine.setCollisionDetector(this._me);
|
||||
this._keyboardInput = new Chuck.Control.KeyboardInput();
|
||||
this._inputControlUnit = new Chuck.Control.InputControlUnit(this._keyboardInput, this._me);
|
||||
|
||||
//this._engine.setCollisionDetector();
|
||||
|
||||
//this._inputControlUnit = InputControlUnit.getInstance();
|
||||
//this._keyboardInput = KeyboardInput.getInstance();
|
||||
|
||||
|
||||
new Chuck.Loader.Level(this._engine);
|
||||
//new Items();
|
||||
|
||||
|
|
@ -50,10 +46,9 @@ Chuck.Processor.prototype._update = function(self) {
|
|||
|
||||
self._engine.update();
|
||||
// Order is important
|
||||
/*
|
||||
self._repository.update();
|
||||
|
||||
//self._repository.update();
|
||||
self._keyboardInput.update();
|
||||
self._me.update();
|
||||
self._camera.update();
|
||||
*/
|
||||
//self._camera.update();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue