Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GameDifficulty

[18:14] static extends: object

Helper for FXGL's GameDifficulty enum (com.almasb.fxgl.gameplay.GameDifficulty). Four difficulty levels selectable through the game settings or menu so game logic can scale behavior to the chosen challenge level.

  • EASY — minimum challenge.
  • MEDIUM — default mid-range challenge.
  • HARD — high challenge.
  • NIGHTMARE — peak challenge.

Methods

  • EASY ()

    Returns the EASY difficulty value.

    • @r An AussomJavaObject around the enum value.
  • MEDIUM ()

    Returns the MEDIUM difficulty value.

    • @r An AussomJavaObject around the enum value.
  • HARD ()

    Returns the HARD difficulty value.

    • @r An AussomJavaObject around the enum value.
  • NIGHTMARE ()

    Returns the NIGHTMARE difficulty value.

    • @r An AussomJavaObject around the enum value.
  • get (string Name)

    Resolves a GameDifficulty enum value by name.

    • @p Name is one of "EASY", "MEDIUM", "HARD", "NIGHTMARE".
    • @r An AussomJavaObject around the enum value.
  • values ()

    Returns GameDifficulty[] containing every constant.

  • valueOf (string Name)

    Standard Enum.valueOf strict lookup.