Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Time

A time that can store a Real Time and a Game Time. Both of them are optional.

Hierarchy

Index

Constructors

constructor

  • new Time(ptr: number): Time
  • This constructor is an implementation detail. Do not use this.

    Parameters

    • ptr: number

    Returns Time

Properties

ptr

ptr: number

Methods

clone

dispose

  • dispose(): void
  • Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.

    Returns void

gameTime

  • The Game Time value. This may be null if this time has no Game Time value.

    Returns TimeSpanRef

index

  • Access the time's value for the timing method specified.

    Parameters

    • timingMethod: number

    Returns TimeSpanRef

realTime

  • The Real Time value. This may be null if this time has no Real Time value.

    Returns TimeSpanRef

with

  • with<T>(closure: (obj: Time) => T): T
  • Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.

    Type parameters

    • T

    Parameters

    • closure: (obj: Time) => T
        • Parameters

          Returns T

    Returns T

Generated using TypeDoc