Basics
Guides
API Reference
Basics
Guides
API Reference
[20:7] extends: IntegerComponent
Wraps FXGL's RechargeableIntComponent (com.almasb.fxgl.dsl.components.RechargeableIntComponent), the abstract base for any rechargeable int-valued resource. Subclasses include HealthIntComponent and ManaIntComponent. This wrapper is abstract; construct one of the concrete subclasses, then optionally rewrap with adopt() if you want the base API.
RechargeableIntComponent ()
Empty default constructor; populate with adopt().
adopt (object Ajo)
Wraps an existing RechargeableIntComponent AussomJavaObject.
getValue ()
Returns the current value (int).
setValue (int V)
Sets the value. Internally clamped to [0..maxValue].
V is the new value.this objectvalueProperty ()
Returns the IntegerProperty for value (binding-friendly).
getMaxValue ()
Returns the max value (int).
setMaxValue (int 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 IntegerProperty.
getValuePercent ()
Returns the value as a percentage of max (0..100, double).
valuePercentProperty ()
Returns the percent binding.
damageFully ()
Sets value to 0.
damage (int 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 (int 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.