Basics
Guides
API Reference
Basics
Guides
API Reference
[24:7] extends: FxObj
Wraps an AussomEffect (subclass of FXGL's abstract Effect) so Aussom code can define custom temporary entity effects. The Effect lives for a fixed duration once applied via EffectComponent.startEffect. Example: e = new Effect(3.0); e.onStart(::startGlow); e.onEnd(::endGlow); ec.startEffect(e); public startGlow(entity) { ... } public endGlow(entity) { ... }
Effect (double DurationSeconds = 1.0)
Creates a new Effect with the given duration in seconds. Use onStart / onUpdate / onEnd to wire callbacks before passing the effect to EffectComponent.startEffect.
DurationSeconds is the effect lifetime in seconds.adopt (object Ajo)
Wraps an existing Effect AussomJavaObject.
onStart (callback Cb)
Registers the onStart callback (fires once when the effect is applied to its Entity). The callback receives the Entity.
Cb is a callback (entity) -> any.this objectonUpdate (callback Cb)
Registers the onUpdate callback (fires every tick while the effect is active). The callback receives (entity, tpf).
Cb is a callback (entity, tpf) -> any.this objectonEnd (callback Cb)
Registers the onEnd callback (fires once when the effect ends, either by timeout or explicit endEffect). The callback receives the Entity.
Cb is a callback (entity) -> any.this objectisFinished ()
Returns true once the effect's duration has elapsed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.