Fixing collision issues

This commit is contained in:
Richard Davey
2013-09-23 01:06:09 +01:00
parent b69b3db486
commit bc02a1a05e
10 changed files with 118 additions and 80 deletions
+2
View File
@@ -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();
+24
View File
@@ -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