mirror of
https://github.com/wassname/phaser.git
synced 2026-08-18 12:20:33 +08:00
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:
+3
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user