mirror of
https://github.com/wassname/phaser.git
synced 2026-07-23 13:00:41 +08:00
Forces working, collision half way there.
This commit is contained in:
+3
-2
@@ -379,16 +379,17 @@ Phaser.Game.prototype = {
|
||||
|
||||
this.input.update();
|
||||
this.tweens.update();
|
||||
// this.stage.update();
|
||||
this.sound.update();
|
||||
// this.physics.update();
|
||||
this.world.update();
|
||||
this.state.update();
|
||||
// this.physics.update();
|
||||
this.plugins.update();
|
||||
|
||||
this.renderer.render(this.world._stage);
|
||||
this.state.render();
|
||||
|
||||
this.world.postUpdate();
|
||||
|
||||
this.plugins.postRender();
|
||||
|
||||
},
|
||||
|
||||
@@ -71,6 +71,30 @@ Phaser.World.prototype = {
|
||||
|
||||
},
|
||||
|
||||
postUpdate: function () {
|
||||
|
||||
//this.camera.update();
|
||||
|
||||
var displayObject = this._stage;
|
||||
|
||||
// once the display object hits this. we can break the loop
|
||||
var testObject = displayObject.last._iNext;
|
||||
displayObject = displayObject.first;
|
||||
|
||||
do
|
||||
{
|
||||
if (displayObject['postUpdate'])
|
||||
{
|
||||
displayObject.postUpdate();
|
||||
}
|
||||
|
||||
// count++
|
||||
displayObject = displayObject._iNext;
|
||||
}
|
||||
while(displayObject != testObject)
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the size of this world.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user