Basics
Guides
API Reference
Basics
Guides
API Reference
[29:7] extends: Action
Wraps FXGL's InstantAction abstract class (com.almasb.fxgl.entity.action.InstantAction). The engine calls performOnce(tpf) the first frame the action becomes current and then auto-completes; useful for one-shot behaviors (fire weapon, open door, play sound). Backed by AussomInstantAction (Java bridge) because the class has overridable performOnce plus the four Action lifecycle hooks. Example: public fire(tpf) { // run once then done } ia = new InstantAction(::fire); ac.addAction(ia.obj);
InstantAction (callback OnPerformOnce = null, callback OnQueued = null, callback OnStarted = null, callback OnCompleted = null, callback OnCancelled = null)
Creates a new InstantAction.
OnPerformOnce is a callback (tpf) -> any fired the first frame this action becomes current.OnQueued is a callback () -> any.OnStarted is a callback () -> any.OnCompleted is a callback () -> any.OnCancelled is a callback () -> any.adopt (object Ajo)
Wraps an existing InstantAction AussomJavaObject.

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