mirror of
https://github.com/wassname/phaser.git
synced 2026-07-28 11:23:50 +08:00
Fixing collision issues
This commit is contained in:
@@ -391,6 +391,8 @@ Phaser.Game.prototype = {
|
||||
this.state.update();
|
||||
this.plugins.update();
|
||||
|
||||
this.world.postUpdate();
|
||||
|
||||
this.renderer.render(this.stage._stage);
|
||||
this.plugins.render();
|
||||
this.state.render();
|
||||
|
||||
@@ -112,6 +112,30 @@ Phaser.World.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* This is called automatically every frame, and is where main logic happens.
|
||||
* @method update
|
||||
*/
|
||||
postUpdate: function () {
|
||||
|
||||
if (this.game.stage._stage.first._iNext)
|
||||
{
|
||||
var currentNode = this.game.stage._stage.first._iNext;
|
||||
|
||||
do
|
||||
{
|
||||
if (currentNode['postUpdate'])
|
||||
{
|
||||
currentNode.postUpdate();
|
||||
}
|
||||
|
||||
currentNode = currentNode._iNext;
|
||||
}
|
||||
while (currentNode != this.game.stage._stage.last._iNext)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the size of this world.
|
||||
* @method setSize
|
||||
|
||||
Reference in New Issue
Block a user