AbstractAbstractcreatebuilds the scene's contents; assets are already loaded when this runs
Called when the scene above pops, reporting back what it decided.
Called when another scene is pushed on top of this one.
Updating already stops on its own - only the top scene runs - but input listeners do not stand down by themselves. A scene holding windows, music or key handlers pauses or detaches them here; the default does nothing.
the display was resized; the scene may relayout rather than be rebuilt
ProtectedteardownRenderer-owned resources this scene holds, released exactly once as it is destroyed.
The base owns none, because it owns no renderer; two-d.Scene2D destroys its container
here. A subclass overriding it does not need to call super.teardown().
One screen of the game: a title, a menu, the dungeon itself.
This is the lifecycle half only, and owns no renderer:
create,update,resize, the suspend/resume pair a pushed scene needs, and a destroy that fires once.two-d.Scene2Dadds the Pixi container a 2D game draws into; a Babylon game supplies its own equivalent. The split exists soSceneStack- which never touches a display node, only these methods - works for either, rather than scene management being something only a Pixi game gets.Switching scenes destroys the old one, so a scene may hold whatever state it likes without cleaning up by hand.
Example