Basics
Guides
API Reference
Basics
Guides
API Reference
[21:7] extends: DoubleComponent
Wraps FXGL's RechargeableDoubleComponent (com.almasb.fxgl.dsl.components.RechargeableDoubleComponent), the abstract base for any rechargeable double-valued resource (HP, SP, ammo). Subclasses include HealthDoubleComponent and ManaDoubleComponent. This wrapper is abstract; construct one of the concrete subclasses, then optionally rewrap with adopt() if you want the base API.
RechargeableDoubleComponent ()
Empty default constructor; populate with adopt().
adopt (object Ajo)
Wraps an existing RechargeableDoubleComponent AussomJavaObject.
getValue ()
Returns the current value (double).
setValue (double V)
Sets the value. Internally clamped to [0..maxValue].
V is the new value.this objectvalueProperty ()
Returns the DoubleProperty for value (binding-friendly).
getMaxValue ()
Returns the max value (double).
setMaxValue (double V)
Sets the max value. Current value is re-clamped if it exceeds the new max.
V is the new max value.this objectmaxValueProperty ()
Returns the max-value DoubleProperty.
getValuePercent ()
Returns the value as a percentage of max (0..100).
valuePercentProperty ()
Returns the percent binding (value / max * 100).
damageFully ()
Sets value to 0.
damage (double Amount)
Reduces value by the given amount (clamped to 0).
Amount is the damage amount.this objectdamagePercentageCurrent (double Percentage)
Damages by a percentage of current value.
Percentage is the percent of current value in 0..100.this objectdamagePercentageMax (double Percentage)
Damages by a percentage of max value.
Percentage is the percent of max value in 0..100.this objectrestoreFully ()
Restores value to max.
restore (double Amount)
Restores by the given amount (clamped to max).
Amount is the restore amount.this objectrestorePercentageCurrent (double Percentage)
Restores by a percentage of current value.
Percentage is the percent of current value in 0..100.this objectrestorePercentageMax (double Percentage)
Restores by a percentage of max value.
Percentage is the percent of max value in 0..100.this objectisZero ()
True iff value is at or below zero.
zeroProperty ()
Returns the BooleanBinding that fires true when value is 0.

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