Basics
Guides
API Reference
Basics
Guides
API Reference
[16:7] extends: Component
Wraps FXGL's StateComponent (com.almasb.fxgl.entity.state.StateComponent), the per-entity FSM container that tracks the current EntityState and provides transitions. Attach to an entity then call changeState / changeStateAllowReentry / changeStateToIdle.
StateComponent (InitialState = null)
Creates a StateComponent starting in the default IDLE state.
adopt (object Ajo)
Wraps an existing StateComponent AussomJavaObject.
getCurrentState ()
Returns the current state as an EntityState wrapper.
currentStateProperty ()
Returns the current-state ReadOnlyObjectProperty for binding.
isIdle ()
Returns whether the current state is IDLE.
changeStateToIdle ()
Transitions to the IDLE state.
changeState (object StateObj)
Transitions to a new state. No-op if already in that state.
changeStateAllowReentry (object StateObj)
Transitions to a state and re-fires onEnteredFrom even when already in that state.
isIn (list States)
Returns true when the current state is among the supplied states.
States is a list of EntityState wrappers / AJOs.A bool.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.