Represents a timer, which must be updated manually with gdjs.Timer.updateTime.

Constructors

Methods

  • Get the time of the timer, in milliseconds.

    Returns number

    The time of the timer, in milliseconds.

  • Set if the timer is paused.

    Parameters

    • enable: boolean

      true to pause the timer, false otherwise.

    Returns void

  • Change the time.

    Parameters

    • time: number

      The new time, in milliseconds.

    Returns void

  • Parameters

    • syncData: TimerNetworkSyncData

    Returns void

  • Notify the timer that some time has passed.

    Parameters

    • time: number

      The elapsed time, in milliseconds.

    Returns void