Fxgl Variables Events

Manage reactive game state in FXGL — declare typed world variables in initGameVars, read/write/increment them via DSL, bind JavaFX UI properties to live variable values, register property-change listeners triggered at specific thresholds, fire and subscribe to custom events on the EventBus, use the built-in game timer (runOnce, runAtInterval), and create offline timers that persist between sessions. Use this skill when tracking score, lives, time, game flags, wiring HUD to game state, implementing event-driven logic, or scheduling delayed/recurring actions.

JohannesRabauer Updated

File contents

JohannesRabauer/fxgl-skills/tree/main/skills/fxgl-variables-events commit 58d978fe92

Frequently asked questions

npx skillmds@latest add johannesrabauer/fxgl-variables-events