Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AchievementEvent

[17:7] extends: FxObj

Wraps FXGL's AchievementEvent (com.almasb.fxgl.achievement.AchievementEvent), the event fired on the EventBus when an achievement unlocks. The wrapper carries the Achievement that triggered it. Use the static type accessors ANY() / ACHIEVED() to subscribe via fxgl.getEventBus().addEventHandler.

Methods

  • AchievementEvent (AchievementObj = null)

    Creates a new AchievementEvent for the given Achievement. Pass null for the adopt path.

    • @p AchievementObj is an Achievement wrapper.
  • adopt (object Ajo)

    Wraps an existing AchievementEvent AussomJavaObject.

    • @p Ajo is an AussomJavaObject around an AchievementEvent.
    • @r A new wrapper.
  • getAchievement ()

    Returns the Achievement associated with this event.

    • @r An Achievement wrapper.
  • ANY ()

    Returns the JavaFX EventType for any AchievementEvent (the common parent of ACHIEVED and PROGRESS).

    • @r An AussomJavaObject around an EventType.
  • ACHIEVED ()

    Returns the JavaFX EventType for an unlock event.

    • @r An AussomJavaObject around an EventType.