Hi, I found that step of each active scene is running in order.
For example, there are 2 active scenes -- sceneA, sceneB
sceneA.events.emit('preupdate')
sceneA.events.emit('update')
sceneA.update()
sceneA.events.emut('postupdate')
sceneB.events.emit('preupdate')
sceneB.events.emit('update')
sceneB.update()
sceneB.events.emut('postupdate')
It seems that game objects in sceneB only could see the final status of game objects in sceneA, not the status of previous state.
Is it possible to run step in this order?
sceneA.events.emit('preupdate')
sceneB.events.emit('preupdate')
sceneA.events.emit('update')
sceneB.events.emit('update')
sceneA.update()
sceneB.update()
sceneA.events.emut('postupdate')
sceneB.events.emut('postupdate')
--
You received this message because you are subscribed to the Google Groups "Phaser 3 Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev+unsubscribe@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phaser3-dev/a859fb84-4050-4efb-90be-0757c9d059ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
sceneA.events.emit('preupdate')
sceneB.events.emit('preupdate')
// now game objects of sceneA could get the status of all game objects in all scenes after 'preupdate' event
sceneA.events.emit('update')
sceneB.events.emit('update')
// now game objects of sceneA could get the status of all game objects in all scenes after 'update' event
sceneA.update()
sceneB.update()
// now game objects of sceneA could get the status of all game objects in all scenes after scene.update()
sceneA.events.emut('postupdate')
sceneB.events.emut('postupdate')
sceneA.events.emit('preupdate')
sceneA.events.emit('update')
sceneA.update()
sceneA.events.emut('postupdate')
sceneB.events.emit('preupdate')
sceneB.events.emit('update')
sceneB.update()
sceneB.events.emut('postupdate')
P.S. Put all related game objects in a scene is another way to solve it.
--
You received this message because you are subscribed to the Google Groups "Phaser 3 Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev+unsubscribe@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phaser3-dev/7688c103-5fdf-430c-a303-5d90965d76a6%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev...@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev+unsubscribe@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phaser3-dev/39d0eacc-b9a3-41fc-9d23-011448b8c8f9%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to phaser3-dev+unsubscribe@googlegroups.com.
To post to this group, send email to phase...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phaser3-dev/d6289020-c620-4821-8d6d-c1b8b820a5c5%40googlegroups.com.