API Docs for: 1.13.1
Show:

game.Timer Class

Extends game.Class
Defined in: engine/timer.js:11
Module: timer

Basic timer.

Constructor

game.Timer

(
  • [ms]
)

Defined in engine/timer.js:11

Parameters:

  • [ms] Number optional

Methods

delta

()

Defined in engine/timer.js:49

Get time since last delta.

extend

(
  • prop
)
game.Class

Inherited from game.Class: engine/core.js:757

Extend class.

Parameters:

  • prop Object

Returns:

init

(
  • arguments
)

Inherited from game.Class: engine/core.js:811

This method is called, when you create new instance of the class.

Parameters:

  • arguments Array

inject

(
  • prop
)

Inherited from game.Class: engine/core.js:825

Inject class.

Parameters:

  • prop Object

pause

()

Defined in engine/timer.js:68

Pause timer.

reset

()

Defined in engine/timer.js:40

Reset timer.

resume

()

Defined in engine/timer.js:76

Resume paused timer.

set

(
  • ms
)

Defined in engine/timer.js:29

Set time for timer.

Parameters:

  • ms Number

staticInit

(
  • arguments
)

Inherited from game.Class: engine/core.js:795

This method is called before init.

Parameters:

  • arguments Array

time

()

Defined in engine/timer.js:59

Get time since start.