Class Delay

Helper with methods to suspend the game for various amounts of time.

Hierarchy

  • Delay

Constructors

Accessors

Methods

Constructors

Accessors

  • get anyActive(): boolean
  • True if any delays are currently running.

    Returns boolean

Methods

  • Very short delay of 1 second.

    Returns Promise<void>

    A promise that fulfils after 1 seconds

  • Parameters

    • Optional reason: any

    Returns void

  • Long delay of 2 seconds.

    Returns Promise<void>

    A promise that fulfils after 3 seconds.

  • Delay for an arbitrary amount of time.

    Parameters

    • value: number

      How long to delay for, in seconds.

    Returns Promise<void>

    A promise that fulfils after the given time.

  • Short delay of 1 second.

    Returns Promise<void>

    A promise that fulfils after 2 seconds.

Generated using TypeDoc