file: Action.aus

class: Action

[30:7] extends: FxObj

Wraps FXGL's Action abstract class (com.almasb.fxgl.entity.action.Action), the base unit of work an ActionComponent runs. An Action is bound to a single Entity and exposes lifecycle hooks (onQueued / onStarted / onUpdate / onCompleted / onCancelled). The engine calls onUpdate(tpf) each frame the action is current; the action ends when setComplete() is called from inside it or cancel() is called from outside. Backed by AussomAction (Java bridge) because Action is abstract and has multiple overridable methods (aji.closure only handles single-method functional interfaces). Example: public update(tpf) { // move toward target, setComplete() when arrived } a = new Action(::update); ac.addAction(a.obj);

Methods