Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: BooleanComponent
Wraps FXGL's ActivatorComponent (com.almasb.fxgl.dsl.components.ActivatorComponent), a BooleanComponent that models a switch or trigger. Tracks how many times it has been activated and whether it can still be deactivated. Useful for one-shot buttons, levers, and pressure plates.
ActivatorComponent (bool CanBeDeactivated = true, int NumTimesCanBeActivated = 2147483647)
Creates a new ActivatorComponent.
CanBeDeactivated true to allow deactivation.NumTimesCanBeActivated is the max activation count.adopt (object Ajo)
Wraps an existing ActivatorComponent AussomJavaObject.
isActivated ()
setActivated (bool V)
getCanBeDeactivated ()
setCanBeDeactivated (bool V)
getNumTimesCanBeActivated ()
setNumTimesCanBeActivated (int V)
press ()
Toggles state honoring the configured activation limits.
activate ()
Activates honoring the activation-count limit.
deactivate ()
Deactivates honoring the canBeDeactivated flag.

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