Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: SweetSpotMiniGame

[15:7] extends: MiniGame

Wraps FXGL's SweetSpotMiniGame (com.almasb.fxgl.minigames.sweetspot.SweetSpotMiniGame), a timing minigame in which a cursor bounces between 0 and 100; the player clicks to stop it. A click between minSuccessValue and maxSuccessValue wins.

Methods

  • SweetSpotMiniGame ()

    Creates a new SweetSpotMiniGame.

  • adopt (object Ajo)

    Wraps an existing SweetSpotMiniGame AussomJavaObject.

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

    Triggers a click. If the cursor is between the min and max success values, the minigame ends with success.

    • @r this object
  • randomizeRange (int SuccessRange)

    Randomizes the success window so the gap between min and max equals the given range (which must be in [0, 100]).

    • @p SuccessRange is the gap width in [0, 100].
    • @r this object
  • getCursorValue ()

    Returns the IntegerProperty for the bouncing cursor (0..100).

    • @r An AussomJavaObject around an IntegerProperty.
  • getMinSuccessValue ()

    Returns the IntegerProperty for the min success value.

    • @r An AussomJavaObject around an IntegerProperty.
  • getMaxSuccessValue ()

    Returns the IntegerProperty for the max success value.

    • @r An AussomJavaObject around an IntegerProperty.