Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: MiniGame

[20:7] extends: FxObj

Wraps FXGL's abstract MiniGame (com.almasb.fxgl.minigames.MiniGame), the base type for every built-in minigame (CircuitBreaker, LockPick, SweetSpot, TriggerMash, TriggerSequence, RandomOccurrence). Carries the minigame's MiniGameResult once isDone becomes true, plus the tpf-driven update loop that the MiniGameView subscene runs. Aussom code typically uses the concrete subclass wrappers (CircuitBreakerMiniGame, SweetSpotMiniGame, etc.) rather than this base; the base wrapper is for adopt flows and shared inspection.

Methods

  • MiniGame ()

    Constructs an empty wrapper; populate via adopt.

  • adopt (object Ajo)

    Wraps an existing MiniGame AussomJavaObject.

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

    Returns the MiniGameResult AussomJavaObject. Only valid after isDone has flipped to true.

    • @r An AussomJavaObject around a MiniGameResult.
  • isDone ()

    Returns whether the minigame has produced its result.

    • @r A bool.
  • onUpdate (double Tpf)

    Advances the minigame by tpf seconds. The hosting MiniGameSubScene calls this every frame.

    • @p Tpf is the time per frame in seconds.
    • @r this object