Split world update into preUpdate and update.

This allows moving the state.update() call to before world.update(),
meaning results of collisions checked in the state are available to
objects in their own update().
This commit is contained in:
Cameron Foale
2013-12-09 15:46:02 +11:00
parent 74e0cfb13a
commit 3e1207e1a3
2 changed files with 33 additions and 19 deletions
+3 -2
View File
@@ -440,14 +440,15 @@ Phaser.Game.prototype = {
{
this.plugins.preUpdate();
this.physics.preUpdate();
this.world.preUpdate();
this.stage.update();
this.input.update();
this.tweens.update();
this.sound.update();
this.world.update();
this.particles.update();
this.state.update();
this.world.update();
this.particles.update();
this.plugins.update();
this.world.postUpdate();