Basics
Guides
API Reference
Basics
Guides
API Reference
[15:7] extends: MiniGame
Wraps FXGL's RandomOccurrenceMiniGame (com.almasb.fxgl.minigames.randomoccurrence.RandomOccurrenceMiniGame), a minigame that races a successFill bar against a failureFill bar; each tick a coin weighted by successChance picks which bar to grow. The first bar to reach 1.0 wins.
RandomOccurrenceMiniGame ()
Creates a new RandomOccurrenceMiniGame. Defaults match FXGL's source: 0.5 success chance, 0.01 max fill per tick.
adopt (object Ajo)
Wraps an existing RandomOccurrenceMiniGame AussomJavaObject.
Ajo is an AussomJavaObject around a RandomOccurrenceMiniGame.A new wrapper.getSuccessChance ()
Returns the success chance per tick (0..1). @r A double.
setSuccessChance (double Chance)
Sets the success chance per tick.
Chance is a double in [0, 1].this objectgetMaxSuccessFill ()
Returns the success-fill cap per tick. @r A double.
setMaxSuccessFill (double Cap)
Sets the success-fill cap per tick. @r this object
getMaxFailureFill ()
Returns the failure-fill cap per tick. @r A double.
setMaxFailureFill (double Cap)
Sets the failure-fill cap per tick. @r this object
getSuccessFill ()
Returns the success-fill DoubleProperty (0..1) for binding to a UI bar.
An AussomJavaObject around a DoubleProperty.getFailureFill ()
Returns the failure-fill DoubleProperty (0..1) for binding.
An AussomJavaObject around a DoubleProperty.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.