file: SceneFactory.aus

class: SceneFactory

[27:7] extends: FxObj

Wraps an AussomSceneFactory (subclass of FXGL's SceneFactory) so Aussom code can override any of the five engine scene factories: newStartup, newIntro, newLoadingScene, newMainMenu, newGameMenu. Each on* method registers an Aussom callback that returns a scene wrapper (or AussomJavaObject) of the matching type; when the callback is unset, FXGL's default scene is used. Install the resulting factory on GameSettings before launch: sf = new SceneFactory(); sf.onMainMenu(::buildMainMenu); settings.setSceneFactory(sf.obj); The onStartupScene callback receives (width, height); the other callbacks take no arguments.

Methods