[1099:7] extends: FxObj
Wraps the JavaFX FXGLPane returned by fxglApp.embeddedLaunch. The underlying pane is a javafx.scene.layout.Region, so this wrapper extends FxObj and composes with every fx layout wrapper that adds children through their .obj member (VBox.add, HBox.add, BorderPane.setCenter, and so on).
fxglPane (Ajo = null)
Constructs a fxglPane around an AussomJavaObject holding the underlying FXGLPane. Normally created by fxglApp.embeddedLaunch rather than directly.
Ajo is an AussomJavaObject wrapping a javafx.scene.layout.Pane.getWidth ()
Returns the current width of the pane.
A double with the pane width.getHeight ()
Returns the current height of the pane.
A double with the pane height.[19:21] static (extern: com.lehman.aussom.stdlib.fxgl.AussomFxgl) extends: object
Root of the FXGL game engine support in Aussom. Provides the gameApp factory used to construct an FXGL GameApplication wrapper for either standalone launch (fxgl owns the Stage) or embedded launch (the returned FXGLPane is placed inside an existing fxApp layout). FXGL and fx.fxApp cannot both initialize JavaFX in the same JVM. Once a standalone fxgl.gameApp(...).launch() has started, fx.fxApp throws. Embedded launch is fine after fx.fxApp because it reuses the JavaFX runtime already started by fx.fxApp.
gameApp (string Title = "Aussom Game", int Width = 800, int Height = 600)
Creates a new FXGL game application wrapper and returns an fxglApp object. Use the fluent setters and onXxx callback registrars on the returned object to configure the game, then call launch() for standalone mode or embeddedLaunch() to obtain a Pane embeddable in an existing fxApp layout.
Title is a string with the game window title.Width is an int with the game width in pixels.Height is an int with the game height in pixels.An fxglApp object.shutdown ()
Requests the currently running FXGL game to exit. No-op if no game is running.
makePropertyMapListener (callback OnUpdated = null, callback OnRemoved = null)
Creates a PropertyMapChangeListener bridge that dispatches FXGL's onUpdated and onRemoved events to a pair of Aussom callbacks. Used internally by fxgl.PropertyMap.addListener; available directly for users who hold an FXGL PropertyMap obtained through AJI rather than through the wrapper.
OnUpdated is a callback receiving (string key, AussomJavaObject value), or null to skip add and update events.OnRemoved is a callback receiving (string key, AussomJavaObject value), or null to skip remove events.An AussomJavaObject wrapping a PropertyMapChangeListener.componentListener (callback OnAdded = null, callback OnRemoved = null)
Creates an AussomComponentListener bridge for the fxgl.ComponentListener wrapper. Each callback receives the Component (wrapped as fxgl.Component when loaded, otherwise a raw AussomJavaObject).
OnAdded is a callback (component) -> void, or null.OnRemoved is a callback (component) -> void, or null.An AussomJavaObject wrapping the listener.action ()
Creates an AussomAction bridge for the fxgl.Action wrapper. Lifecycle callbacks (onQueued / onStarted / onUpdate / onCompleted / onCancelled) are wired through setter calls on the returned AJO by the Action wrapper class.
An AussomJavaObject wrapping the AussomAction.continuousAction ()
Creates an AussomContinuousAction bridge for the fxgl.ContinuousAction wrapper. Lifecycle callbacks are wired through setter calls on the returned AJO by the wrapper class.
An AussomJavaObject wrapping the AussomContinuousAction.instantAction ()
Creates an AussomInstantAction bridge for the fxgl.InstantAction wrapper. Lifecycle callbacks are wired through setter calls on the returned AJO by the wrapper class.
An AussomJavaObject wrapping the AussomInstantAction.userAction (string Name)
Creates a new AussomUserAction with the given name, returned as an AussomJavaObject. Pair with the UserAction Aussom wrapper for fluent callback setup.
Name is the action name (e.g. "Move Left", "Shoot").An AussomJavaObject wrapping the AussomUserAction.triggerListener ()
Creates an AussomTriggerListener backing instance for the fxgl.TriggerListener Aussom wrapper. Use the TriggerListener wrapper for the fluent setup; this extern is its constructor backbone.
An AussomJavaObject wrapping an AussomTriggerListener.fsmState (bool IsSubState, bool IsAllowConcurrency)
Creates an AussomState backing instance used by the fxgl.State / fxgl.StateMachine wrappers. The State wrapper wires the lifecycle callbacks (onCreate, onDestroy, onEnteredFrom, onExitingTo); this extern is its constructor backbone.
IsSubState is true for substate behavior.IsAllowConcurrency is true to allow concurrent active substates above.An AussomJavaObject wrapping an AussomState.view (object NodeAjo)
Creates an AussomView backing the fxgl.View wrapper. Implements FXGL's View interface (Updatable + Disposable + getNode) around the supplied Node.
NodeAjo is an AussomJavaObject around a JavaFX Node.An AussomJavaObject wrapping an AussomView.component ()
Creates an AussomComponent backing instance for the fxgl.Component Aussom wrapper. Use the Component wrapper for the fluent setup; this extern is its constructor backbone.
An AussomJavaObject wrapping an AussomComponent.effect (double DurationSeconds)
Creates an AussomEffect backing instance for the fxgl.Effect Aussom wrapper. The Effect wrapper wires its onStart / onUpdate / onEnd callbacks; this extern is its constructor backbone.
DurationSeconds is the effect duration in seconds.An AussomJavaObject wrapping an AussomEffect.worldListener (callback OnAdded = null, callback OnRemoved = null)
Creates an EntityWorldListener bridge for GameWorld.addWorldListener. Each callback receives an Entity.
OnAdded is a callback receiving the added entity, or null.OnRemoved is a callback receiving the removed entity, or null.An AussomJavaObject wrapping the listener.collisionHandler (string TypeA, string TypeB)
Creates an AussomCollisionHandler bridging the abstract CollisionHandler to Aussom callbacks. TypeA / TypeB identify the two colliding entity types and order the entity pair the callbacks receive.
TypeA is the first entity type string.TypeB is the second entity type string.An AussomJavaObject wrapping the handler.sensorCollisionHandler ()
Factory for AussomSensorCollisionHandler. The Aussom SensorCollisionHandler wrapper is its fluent setup; this extern is its constructor backbone.
An AussomJavaObject wrapping the handler.contactListener ()
Factory for AussomContactListener, the four-callback bridge over jbox2d's ContactListener interface. The Aussom ContactListener wrapper wires the on* hooks; install on a World wrapper via setContactListener.
An AussomJavaObject wrapping the listener.contactFilter ()
Factory for AussomContactFilter, the override hook over jbox2d's ContactFilter. The Aussom ContactFilter wrapper wires the onShouldCollide hook; install on a World wrapper via setContactFilter.
An AussomJavaObject wrapping the filter.uiController ()
Factory for AussomUIController, an FXGL UIController implementation that fires an Aussom callback for the FXML init hook. The Aussom UIController wrapper wires the onInit hook.
An AussomJavaObject wrapping the controller.dialogFactoryService ()
Factory for AussomDialogFactoryService, the subclass extension of FXGL's abstract DialogFactoryService. The Aussom DialogFactoryService wrapper wires the per-dialog hooks; FXGL calls into the registered service when a dialog is requested.
An AussomJavaObject wrapping the service.notificationView ()
Factory for AussomNotificationView, the subclass extension of FXGL's abstract NotificationView. The Aussom NotificationView wrapper wires the animation / push / update hooks. FXGL instantiates a registered subclass on its own, so this factory is most useful for tests and adoption.
An AussomJavaObject wrapping the view.shopListener ()
Factory for AussomShopListener, the Aussom bridge over FXGL's ShopListener interface. The Aussom ShopListener wrapper wires its onSold / onBought hooks after this returns.
An AussomJavaObject wrapping the listener.functionCallHandler ()
Factory for AussomFunctionCallHandler, the subclass extension of FXGL's abstract FunctionCallHandler used by DialogueGraphs when a function-call line does not match a registered delegate method. The Aussom FunctionCallHandler wrapper wires its onHandle hook after this returns.
An AussomJavaObject wrapping the handler.propertyViewFactory ()
Factory for AussomPropertyViewFactory, a PropertyViewFactory implementation parameterised on Object / Node so any property type works. The Aussom PropertyViewFactory wrapper wires the makeView / onPropertyChanged / onViewChanged hooks.
An AussomJavaObject wrapping the factory.sceneFactory ()
Factory for AussomSceneFactory, the subclass extension of FXGL's SceneFactory. The Aussom SceneFactory wrapper wires the on* hooks (onStartupScene, onIntroScene, onLoadingScene, onMainMenu, onGameMenu) after this returns. Install on GameSettings.setSceneFactory before launching the game.
An AussomJavaObject wrapping the factory.customShape3D ()
Factory for AussomCustomShape3D, the subclass extension of FXGL's abstract CustomShape3D. The Aussom CustomShape3D wrapper wires the onCreateMesh callback after this returns; Aussom code then calls updateMesh to invoke the callback and install the resulting Mesh on the shape.
An AussomJavaObject wrapping the shape.engineService ()
Factory for AussomEngineService, the subclass extension of FXGL's abstract EngineService. The Aussom EngineService wrapper wires onInit / onMainLoopStarting / onVarsInitialized / onGameReady / onUpdate / onGameUpdate / onGameReset / onExit / onMainLoopPausing / onMainLoopResumed / onWrite / onRead after this returns. Install via GameSettings.addEngineService before launch.
An AussomJavaObject wrapping the service.serializableType ()
Factory for AussomSerializableType, an implementation of FXGL's SerializableType interface. The Aussom SerializableType wrapper wires onWrite and onRead after this returns; each callback receives a Bundle wrapper.
An AussomJavaObject wrapping the type.virtualController (object InputAjo)
Factory for AussomVirtualController, the subclass extension of FXGL's abstract VirtualController. The Aussom VirtualController wrapper wires the onCreateView callback which receives the VirtualButton name and returns a JavaFX Node wrapper.
InputAjo is an Input AussomJavaObject (typically fxgl.getInput()).An AussomJavaObject wrapping the controller.virtualDpad (object InputAjo)
Factory for AussomVirtualDpad, the subclass extension of FXGL's abstract VirtualDpad. The Aussom VirtualDpad wrapper wires the onCreateView callback which receives the VirtualButton name (UP / DOWN / LEFT / RIGHT) and returns a JavaFX Node wrapper.
InputAjo is an Input AussomJavaObject.An AussomJavaObject wrapping the dpad.virtualMenuKey (object InputAjo, string KeyName, bool IsMenuEnabled)
Factory for AussomVirtualMenuKey, the subclass extension of FXGL's abstract VirtualMenuKey. The Aussom VirtualMenuKey wrapper wires the onCreateView callback (no arguments, returns a JavaFX Node wrapper).
InputAjo is an Input AussomJavaObject.KeyName is the javafx.scene.input.KeyCode enum name to mock when the view is pressed (e.g. "ESCAPE").IsMenuEnabled chooses between mockKeyPressEvent (true, fires menu hooks) and mockKeyPress (false).An AussomJavaObject wrapping the menu key.virtualJoystick (object InputAjo)
Factory for AussomVirtualJoystick, the subclass extension of FXGL's abstract VirtualJoystick. The Aussom VirtualJoystick wrapper wires onGetCenter (returns a Point2D wrapper) and onGetMaxDistance (returns a double). Add children (background / thumb shapes) via the standard Parent API after construction.
InputAjo is an Input AussomJavaObject.An AussomJavaObject wrapping the joystick.animatable ()
Factory for AussomAnimatable, an implementation of FXGL's Animatable interface. The Aussom Animatable wrapper wires one callback per property (xProperty, yProperty, zProperty, scaleXProperty, scaleYProperty, scaleZProperty, rotationXProperty, rotationYProperty, rotationZProperty, opacityProperty) plus setScaleOrigin and setRotationOrigin. Each property callback must return a JavaFX DoubleProperty wrapper.
An AussomJavaObject wrapping the animatable.booleanComponent (bool InitialValue)
Factory for AussomBooleanComponent, a concrete subclass of FXGL's abstract BooleanComponent. The Aussom BooleanComponent wrapper exposes getValue / setValue / valueProperty after this returns.
InitialValue is the initial boolean value.An AussomJavaObject wrapping the component.integerComponent (int InitialValue)
Factory for AussomIntegerComponent, a concrete subclass of FXGL's abstract IntegerComponent.
InitialValue is the initial int value.An AussomJavaObject wrapping the component.doubleComponent (double InitialValue)
Factory for AussomDoubleComponent, a concrete subclass of FXGL's abstract DoubleComponent.
InitialValue is the initial double value.An AussomJavaObject wrapping the component.stringComponent (string InitialValue)
Factory for AussomStringComponent, a concrete subclass of FXGL's abstract StringComponent.
InitialValue is the initial string value.An AussomJavaObject wrapping the component.objectComponent (InitialValue)
Factory for AussomObjectComponent, a concrete subclass of FXGL's abstract ObjectComponent
InitialValue is any value (typically an AussomJavaObject).An AussomJavaObject wrapping the component.getInput ()
Returns the running game's Input service.
getGameWorld ()
Returns the running game's GameWorld.
getGameScene ()
Returns the running game's GameScene.
getGameTimer ()
Returns the running game's game Timer.
getEventBus ()
Returns the running game's EventBus.
getDialogService ()
Returns the running game's DialogService.
getNotificationService ()
Returns the running game's NotificationService.
getUIFactoryService ()
Returns the running game's UIFactoryService.
getTaskService ()
Returns the running game's IOTaskExecutorService.
getAssetLoader ()
Returns the running game's asset loader.
getPhysicsWorld ()
Returns the running game's PhysicsWorld.
getSceneService ()
Returns the running game's SceneService.
getAchievementService ()
Returns the running game's AchievementService.
getQuestService ()
Returns the running game's QuestService.
getCutsceneService ()
Returns the running game's CutsceneService.
getMiniGameService ()
Returns the running game's MiniGameService.
getLocalizationService ()
Returns the running game's LocalizationService.
getControllerInputService ()
Returns the running game's ControllerInputService. The service exposes a list of attached game controllers (see Controller.aus). FXGL's DSL has no dedicated accessor for this service; this wrapper goes through the engine's generic getService(class) instead.
getAussomService (string AussomClassName)
Returns the Aussom service instance registered under the given class name via GameSettings.addAussomEngineService. The instance is the live Aussom object the AussomEngineService bridge dispatches lifecycle hooks to — use it to read state the service builds up.
AussomClassName is the string name of an Aussom class previously registered with addAussomEngineService.The Aussom object instance, or null when no registration exists.getSettings ()
Returns the running game's ReadOnlyGameSettings. Distinct from the pre-launch GameSettings used in onInitSettings, this object exposes the live values game code may want to read or change at runtime (volumes, fullScreen, language, difficulty).
getVersion ()
Returns the FXGL version string.
isReleaseMode ()
Returns true when the app was built in RELEASE mode.
isBrowser ()
Returns true when the app is running in a browser.
isDesktop ()
Returns true when the app is running on a desktop OS.
isMobile ()
Returns true when the app is running on a mobile platform.
getAppWidth ()
Returns the app width in design pixels.
getAppHeight ()
Returns the app height in design pixels.
getAppCenter ()
Returns the app center as an AussomJavaObject around Point2D.
getGameController ()
Returns the running game controller (pause / resume / save / load / exit) as an AussomJavaObject.
getAudioPlayer ()
Returns the running game's AudioPlayer.
getSaveLoadService ()
Returns the SaveLoadService.
saveLoadHandler (callback OnSave = null, callback OnLoad = null)
Creates a SaveLoadHandler that bridges Aussom onSave / onLoad callbacks into FXGL's save-load pipeline. Pair with SaveLoadService.addHandler. Each callback receives a DataFile wrapper.
getFileSystemService ()
Returns the FileSystemService.
getSystemBundle ()
Returns the SystemBundle.
getDevService ()
Returns the DevService (debug overlay support).
getDialogFactoryService ()
Returns the DialogFactoryService.
getWindowService ()
Returns the WindowService.
getNetService ()
Returns the NetService.
getExecutor ()
Returns the async Executor.
getService (string ClassName)
Returns an arbitrary EngineService by fully qualified class name.
tpf ()
Returns the current frame's tpf in seconds.
cpuNanoTime ()
Returns the current CPU nanoseconds counter.
getWorldProperties ()
Returns the world PropertyMap directly.
getEngineTimer ()
Returns the always-on engine Timer (does not pause).
newLocalTimer ()
Returns a new LocalTimer.
newOfflineTimer (string Name)
Returns a new offline Timer for cooldowns that persist across process restarts.
image (string Name)
Loads an image by asset name (returns Image AJO).
texture (string Name)
Loads a Texture by asset name.
text (string Name)
Loads a text file's lines as a list of strings.
loopBGM (string Name)
Loops a background music track by asset name.
debug (string Message)
Pushes a one-shot debug message to the dev overlay.
randomDouble ()
Returns a random double in 0..1.
randomInt (int Min, int Max)
Returns a random int in [Min, Max].
randomDoubleRange (double Min, double Max)
Returns a random double in [Min, Max].
geto (string Key)
Returns the object value of a world property.
inc (string Key, Delta)
Increments an int or double world property by Delta.
getip (string Key)
Returns the IntegerProperty backing the named world var.
getdp (string Key)
Returns the DoubleProperty backing the named world var.
getbp (string Key)
Returns the BooleanProperty backing the named world var.
getsp (string Key)
Returns the StringProperty backing the named world var.
getop (string Key)
Returns the ObjectProperty backing the named world var.
setLevelFromMap (string Name)
Loads a level from a Tiled map by name.
onIntChange (string Key, callback Cb)
Fires the callback on every int change of the named world var. Callback signature: (newValue) -> void.
onIntChangeTo (string Key, int Target, callback Cb)
Fires the callback when the named int property reaches Target. Callback signature: () -> void.
onDoubleChange (string Key, callback Cb)
Fires on every double change. Callback: (newValue).
onBooleanChange (string Key, callback Cb)
Fires on every bool change. Callback: (newValue).
onBooleanChangeTo (string Key, bool Target, callback Cb)
Fires when the bool property reaches Target. Callback: ().
onStringChange (string Key, callback Cb)
Fires on every string change. Callback: (newValue).
onStringChangeTo (string Key, string Target, callback Cb)
Fires when the string property reaches Target. Callback: ().
onKeyDown (string KeyName, string ActionName, callback Cb)
Binds the callback to a key-down event. KeyName is the KeyCode name (e.g. "SPACE"). Callback: () -> void.
onKey (string KeyName, string ActionName, callback Cb)
Binds a held-key handler. Callback: () -> void.
onKeyUp (string KeyName, string ActionName, callback Cb)
Binds a key-up handler. Callback: () -> void.
onBtnDown (string BtnName, string ActionName, callback Cb)
Binds a mouse-down handler. Callback: () -> void.
onBtn (string BtnName, string ActionName, callback Cb)
Binds a held-mouse handler. Callback: () -> void.
onBtnUp (string BtnName, string ActionName, callback Cb)
Binds a mouse-up handler. Callback: () -> void.
onCollisionBegin (object TypeA, object TypeB, callback Cb)
Binds a collision-begin handler for entity types (Java enum values). Callback: (entityA, entityB) -> void.
onCollisionGeneric (object TypeA, object TypeB, callback Cb)
Binds a per-frame collision handler for entity types (Java enum values). Callback: (entityA, entityB) -> void.
onCollisionEnd (object TypeA, object TypeB, callback Cb)
Binds a collision-end handler. Callback: (entityA, entityB) -> void.
addVarText (string Name, double X, double Y)
Adds a data-bound text label at (X, Y) showing a world property's value.
addText (string Message, double X, double Y)
Adds a static text label at (X, Y).
onObjectChange (string Key, callback Cb)
Fires on every change of an object world property. Callback: (newValue).
loopBGMUrl (string Url)
Loops a background music track from a URL string.
playUrl (string Url)
Plays a one-shot audio clip from a URL string.
buildScreenBoundsAndAttach (double Thickness)
Builds a screen-bounds Entity (LEFT / RIGHT / TOP / BOT walls of the given pixel thickness, each carrying a PhysicsComponent) and attaches it to the game world. Returns the bounds Entity wrapper. Mirrors EntityBuilder.buildScreenBoundsAndAttach for the common physics-bounds setup; the rest of the builder pattern is still intentionally skipped.
Thickness is the wall thickness in pixels.The screen-bounds Entity wrapper.entityFactory ()
Returns a fresh EntityFactory wrapper. Pair with
addSpawner(name, cb)andattachTo(world)on the returned wrapper to author an EntityFactory replacement without the upstream@Spawnsannotation scan.
An EntityFactory wrapper.installEntitySpawner (object WorldObj, object FactoryObj, string Name, callback Cb)
Installs an Aussom callback as the spawner for the given name on a GameWorld. Used by the Aussom-side EntityFactory wrapper; not normally invoked by user code.
WorldObj is a GameWorld wrapper.FactoryObj is an EntityFactory wrapper.Name is the spawn name string.Cb is a callback (spawnData) -> Entity wrapper.removeEntitySpawner (object WorldObj, object FactoryObj, string Name)
Removes a previously installed spawner. Used by the Aussom-side EntityFactory wrapper; not normally invoked by user code.
hasEntitySpawner (object WorldObj, string Name)
Returns whether a spawner with the given name is registered on the GameWorld.
entityBuilder ()
Returns a fresh EntityBuilder wrapper for fluent setup of a new Entity. Mirrors
FXGL.entityBuilder().
An EntityBuilder wrapper.entityBuilderFromData (object Data)
Returns an EntityBuilder seeded with the given SpawnData (position + type + every key copied into the entity's properties). Mirrors
FXGL.entityBuilder(data).
Data is a SpawnData wrapper.An EntityBuilder wrapper.eventBuilder ()
Returns a fresh EventBuilder wrapper for fluent setup of a timer-driven EventBus event. Mirrors
FXGL.eventBuilder().
An EventBuilder wrapper.onKeyBuilder (object KeyCodeAjo)
Creates a KeyInputBuilder bound to the active Input service for the given key, with no modifier. Mirrors
FXGL.onKeyBuilder(key).
KeyCodeAjo is a javafx.scene.input.KeyCode AJO.A KeyInputBuilder wrapper.onKeyBuilderMod (object KeyCodeAjo, object ModifierAjo)
KeyInputBuilder factory variant with an InputModifier (e.g. SHIFT, CTRL). Mirrors
FXGL.onKeyBuilder(key, modifier).
KeyCodeAjo is a javafx.scene.input.KeyCode AJO.ModifierAjo is a com.almasb.fxgl.input.InputModifier AJO.A KeyInputBuilder wrapper.onKeyBuilderNamed (object KeyCodeAjo, string Name)
KeyInputBuilder factory variant with an explicit action name (instead of the default AUTO-N counter). Mirrors
FXGL.onKeyBuilder(key, name).
KeyCodeAjo is a javafx.scene.input.KeyCode AJO.Name is the UserAction name string.A KeyInputBuilder wrapper.onKeyBuilderVirtual (object KeyCodeAjo, object VirtualButtonAjo)
KeyInputBuilder factory variant with a VirtualButton mapping (mobile / virtual-controller path). Mirrors
FXGL.onKeyBuilder(key, virtualButton).
KeyCodeAjo is a javafx.scene.input.KeyCode AJO.VirtualButtonAjo is a com.almasb.fxgl.input.virtual.VirtualButton AJO.A KeyInputBuilder wrapper.onKeyBuilderModVirtual (object KeyCodeAjo, object ModifierAjo, object VirtualButtonAjo)
KeyInputBuilder factory variant with both an InputModifier and a VirtualButton. Mirrors
FXGL.onKeyBuilder(key, modifier, virtualButton).
A KeyInputBuilder wrapper.onKeyBuilderInput (object InputObj, object KeyCodeAjo, object ModifierAjo)
KeyInputBuilder factory variant against a custom Input service (rather than the active engine Input). Mirrors
FXGL.onKeyBuilder(input, key, modifier).
InputObj is an Input wrapper (or raw AJO).KeyCodeAjo is a javafx.scene.input.KeyCode AJO.ModifierAjo is a com.almasb.fxgl.input.InputModifier AJO.A KeyInputBuilder wrapper.spawnFadeIn (string EntityName, object Data, double DurationSeconds)
Spawns an entity by name and fades it in over the given duration. Requires a SpawnData and an EntityFactory registered with the running GameWorld.
spawnWithScale (string EntityName, object Data, double DurationSeconds, object InterpolatorObj)
Spawns an entity by name and scales it in from zero over the given duration, using the supplied Interpolator AJO.
despawnWithScale (object EntityObj, double DurationSeconds, object InterpolatorObj)
Animates the entity scaling down to zero over the given duration, then removes it from the world.
despawnWithDelay (object EntityObj, double DelaySeconds)
Removes the entity from the world after the given delay.
onCollisionOneTimeOnly (object TypeA, object TypeB, callback Cb)
Binds a collision handler that fires once per (entityA, entityB) pair and then auto-disables. Callback: (entityA, entityB) -> void.
onCollisionCollectible (object TypeCollector, object TypeCollectible, callback Cb)
Binds a "collector picks up collectible" shortcut that fires for every collision and removes the collectible entity. Callback: (collectibleEntity) -> void.
addUINode (object NodeObj)
Adds a UI Node to the running game scene's overlay.
addUINodeAt (object NodeObj, double X, double Y)
Adds a UI Node at the given (X, Y) on the overlay.
removeUINode (object NodeObj)
Removes a UI Node previously added with addUINode.
centerTextX (object TextObj, double MinX, double MaxX)
Centers a Text node horizontally between (MinX, MaxX).
centerTextY (object TextObj, double MinY, double MaxY)
Centers a Text node vertically between (MinY, MaxY).
centerText (object TextObj)
Centers a Text node on the current app dimensions.
centerTextAt (object TextObj, double X, double Y)
Centers a Text node on the given (X, Y).
centerTextBind (object TextObj)
Binds a Text node's layout-width listener so it stays centered on the current app dimensions even as the text changes.
centerTextBindAt (object TextObj, double X, double Y)
Binds a Text node's layout-width listener so it stays centered on the given (X, Y).
set (string Key, Value)
Sets a world-level property with typed dispatch (int -> IntegerProperty, double -> DoubleProperty, bool -> BooleanProperty, string -> StringProperty).
Key is the property name.Value is the value to store.geti (string Key)
Returns an int world property by name.
getd (string Key)
Returns a double world property by name.
getb (string Key)
Returns a boolean world property by name.
gets (string Key)
Returns a string world property by name.
play (string AssetName)
Plays a sound asset by name through the running game's audio player.
AssetName is the asset path relative to assets/sounds.[990:14] (extern: com.lehman.aussom.stdlib.fxgl.AussomFxglApp) extends: object
Represents an FXGL game application. Holds the user-provided lifecycle callbacks and (after launch) drives the FXGL game loop. Most setup is done before launch: register the onXxx callbacks, optionally provide an onInitSettings callback to configure GameSettings beyond the title / width / height passed to gameApp.
launch ()
Starts the game in standalone mode. FXGL owns the Stage and the call blocks until the game exits. Throws aussomException if fx.fxApp has already initialized JavaFX in this process.
embeddedLaunch ()
Starts the game in embedded mode and returns an fxglPane that can be added to any existing fxApp layout. Does not block.
An fxglPane wrapping the FXGL game viewport.embeddedShutdown ()
Shuts down the embedded FXGL instance started by embeddedLaunch. No-op if no embedded FXGL is running.
embeddedLaunchAndWait ()
Synchronous embedded launch — bootstraps JavaFX once per JVM and runs the game via the cyclable embedded path. Blocks until exit() is called, then tears FXGL down (via embeddedShutdown) while leaving the JavaFX runtime alive for the next call. Use this for unit / integration tests that need to launch and tear down an FXGL game multiple times in one JVM (
aussom -ta api-all.ausstyle). The standalone launch() cannot be used for multi-game runs because JavaFX's Application.launch is one-shot per process.
selfexit ()
Requests the running game to exit. Equivalent to fxgl.shutdown().
onInitSettings (callback Cb)
Registers a callback that receives a GameSettings object so the user can configure FXGL settings beyond title / width / height. The callback runs during FXGL bootstrap, before the JavaFX UI thread starts.
Cb is a callback that takes a GameSettings argument.onPreInit (callback Cb)
Registers a callback that runs once after services are configured but before initInput. Executed on the JavaFX UI thread.
Cb is a callback with no arguments.onInitInput (callback Cb)
Registers a callback that runs once to bind input actions to keys and mouse buttons. Executed on the JavaFX UI thread.
Cb is a callback with no arguments.onInitGameVars (callback Cb)
Registers a callback that runs once to initialize global game variables. Executed on a background thread.
Cb is a callback with no arguments.onInitGame (callback Cb)
Registers a callback that runs once to spawn the initial game objects. Executed on a background thread.
Cb is a callback with no arguments.onInitPhysics (callback Cb)
Registers a callback that runs once to wire collision handlers and physics properties. Executed on a background thread.
Cb is a callback with no arguments.onInitUI (callback Cb)
Registers a callback that runs once to build the in-game UI. Executed on a background thread.
Cb is a callback with no arguments.onUpdate (callback Cb)
Registers a callback that runs every frame while the game is in the play state. Executed on the JavaFX UI thread.
Cb is a callback that takes a double tpf (time per frame, in seconds).