Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TriggerMashMiniGame

[15:7] extends: MiniGame

Wraps FXGL's TriggerMashMiniGame (com.almasb.fxgl.minigames.triggermash.TriggerMashMiniGame), the "mash this key" minigame. The fillValue decays each frame at decayRate; each successful press boosts it by boostRate. The minigame wins when fillValue reaches 100.

Methods

  • TriggerMashMiniGame (KeyTriggerObj = null)

    Creates a new TriggerMashMiniGame for the given KeyTrigger. Pass null for the adopt path.

    • @p KeyTriggerObj is an AussomJavaObject around a KeyTrigger.
  • adopt (object Ajo)

    Wraps an existing TriggerMashMiniGame AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a TriggerMashMiniGame.
    • @r A new wrapper.
  • getTrigger ()

    Returns the active KeyTrigger AJO.

  • setTrigger (object KeyTriggerObj)

    Replaces the active KeyTrigger.

    • @p KeyTriggerObj is an AussomJavaObject around a KeyTrigger.
    • @r this object
  • getBoostRate ()

    Returns the per-press boost rate. @r A double.

  • setBoostRate (double Rate)

    Sets the per-press boost rate.

    • @p Rate is the new boost rate.
    • @r this object
  • getDecayRate ()

    Returns the per-tick decay rate. @r A double.

  • setDecayRate (double Rate)

    Sets the per-tick decay rate.

    • @p Rate is the new decay rate.
    • @r this object
  • getFillValue ()

    Returns the fillValue DoubleProperty for binding to a UI bar.

    • @r An AussomJavaObject around a DoubleProperty.
  • boost ()

    Applies a boost to the fill value. Equivalent to a successful key press; included for callers that want to drive the minigame manually.

    • @r this object