API Documentation

for 0.0.1
Show:

Time Class

The Time class provides methods to control time related operations. One instance of this Component is created internnaly by the Context. It makes it possible to access and to use a global time in Components that require it (i.e Touch, Animation, etc.). In users script, this global Time can be accessed via the context.

Constructor

Time

()

Example:

//TODO

Methods

getAbsoluteDelta

() Number

absolute Delta

Returns:

Number:

absolute Delta

getDelta

() Number

Get the current timeDelta (difference of time between 2 frames) at the current timeScale

Returns:

Number:

the current timeDelta at the current timeScale

getTime

() Number

Gets the current Time object's time

Returns:

Number:

the current time

getTimeScale

() Number

Get the current timeScale

Returns:

Number:

scale

off

()

Pause the Time

on

()

Start the Time

reset

()

resets this time instance

setTimeScale

(
  • scale
)

Set the current timeScale, useful to slower time down

Parameters:

  • scale Number

update

()

updates this time instance