Skip to content

Scenes SubScenes Screens (FXGL 11)

Almas Baimagambetov edited this page Aug 2, 2021 · 2 revisions

When you have multiple "states" in your game: open-world movement state, in-game battle state, shop state, etc., you want to use a SubScene.

A reasonably simple example can be found in Breakout, where each new level animation is played in its own subscene.

Scene Graph Hierarchy

MainWindow
-- javafx scene
---- FXGL scene root
------ FXGL scene content root 
-------- (sub scene root)
Clone this wiki locally