Class: TimerEvent

Phaser.Time. TimerEvent

[description]


new TimerEvent(config)

Parameters:
Name Type Description
config TimerEventConfig

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 24)

Members


args :array

Additional arguments to be passed to the callback.

Type:
  • array
Since: 3.0.0
Source: src/time/TimerEvent.js (Line 102)

callback :function

The callback that will be called when the TimerEvent occurs.

Type:
  • function
Since: 3.0.0
Source: src/time/TimerEvent.js (Line 84)

callbackScope :object

The scope in which the callback will be called.

Type:
  • object
Since: 3.0.0
Source: src/time/TimerEvent.js (Line 93)

<readonly> delay :number

The delay in ms at which this TimerEvent fires.

Type:
  • number
Since: 3.0.0
Default Value:
  • 0
Source: src/time/TimerEvent.js (Line 41)

elapsed :number

[description]

Type:
  • number
Since: 3.0.0
Default Value:
  • 0
Source: src/time/TimerEvent.js (Line 131)

hasDispatched :boolean

[description]

Type:
  • boolean
Since: 3.0.0
Default Value:
  • false
Source: src/time/TimerEvent.js (Line 151)

<readonly> loop :boolean

True if this TimerEvent loops, otherwise false.

Type:
  • boolean
Since: 3.0.0
Default Value:
  • false
Source: src/time/TimerEvent.js (Line 73)

paused :boolean

[description]

Type:
  • boolean
Since: 3.0.0
Default Value:
  • false
Source: src/time/TimerEvent.js (Line 141)

<readonly> repeat :number

The total number of times this TimerEvent will repeat before finishing.

Type:
  • number
Since: 3.0.0
Default Value:
  • 0
Source: src/time/TimerEvent.js (Line 52)

repeatCount :number

If repeating this contains the current repeat count.

Type:
  • number
Since: 3.0.0
Default Value:
  • 0
Source: src/time/TimerEvent.js (Line 63)

startAt :number

Start this many MS into the elapsed (useful if you want a long duration with repeat, but for the first loop to fire quickly)

Type:
  • number
Since: 3.0.0
Default Value:
  • 0
Source: src/time/TimerEvent.js (Line 121)

timeScale :number

Scale the time causing this TimerEvent to update.

Type:
  • number
Since: 3.0.0
Default Value:
  • 1
Source: src/time/TimerEvent.js (Line 111)

Methods


destroy()

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 296)

getElapsed()

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 251)
Returns:

[description]

Type
number

getElapsedSeconds()

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 264)
Returns:

[description]

Type
number

getOverallProgress()

Gets the progress of the timer overall, factoring in repeats.

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 215)
Returns:

[description]

Type
number

getProgress()

Gets the progress of the current iteration, not factoring in repeats.

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 202)
Returns:

[description]

Type
number

getRepeatCount()

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 238)
Returns:

[description]

Type
number

remove(dispatchCallback)

[description]

Parameters:
Name Type Description
dispatchCallback function

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 277)

reset(config)

[description]

Parameters:
Name Type Description
config TimerEventConfig

[description]

Since: 3.0.0
Source: src/time/TimerEvent.js (Line 164)
Returns:

This TimerEvent object.

Type
Phaser.Time.TimerEvent