Class: TweenManager

Phaser.Tweens. TweenManager

[description]


new TweenManager(scene)

Parameters:
Name Type Description
scene Phaser.Scene

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 14)

Members


scene :Phaser.Scene

[description]

Type:
Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 31)

systems :Phaser.Scenes.Systems

[description]

Type:
Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 40)

timeScale :number

[description]

Type:
  • number
Since: 3.0.0
Default Value:
  • 1
Source: src/tweens/TweenManager.js (Line 49)

Methods


add(config)

Create a Tween and add it to the active Tween list.

Parameters:
Name Type Description
config object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 201)
Returns:

[description]

Type
Phaser.Tweens.Tween

addCounter(config)

Create a Tween and add it to the active Tween list.

Parameters:
Name Type Description
config object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 241)
Returns:

[description]

Type
Phaser.Tweens.Tween

create(config)

Create a Tween and return it, but do NOT add it to the active or pending Tween lists.

Parameters:
Name Type Description
config object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 186)
Returns:

[description]

Type
Phaser.Tweens.Tween

createTimeline(config)

Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists.

Parameters:
Name Type Description
config object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 147)
Returns:

[description]

Type
Phaser.Tweens.Timeline

destroy()

The Scene that owns this plugin is being destroyed.
We need to shutdown and then kill off all external references.

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 666)

each(callback [, scope] [, args])

Passes all Tweens to the given callback.

Parameters:
Name Type Argument Description
callback function

[description]

scope object <optional>

[description]

args * <optional>
<repeatable>

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 405)

existing(tween)

Add an existing tween into the active Tween list.

Parameters:
Name Type Description
tween Phaser.Tweens.Tween

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 222)
Returns:

This Tween Manager object.

Type
Phaser.Tweens.TweenManager

getAllTweens()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 432)
Returns:

[description]

Type
Array.<Phaser.Tweens.Tween>

getGlobalTimeScale()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 453)
Returns:

[description]

Type
number

getTweensOf(target)

[description]

Parameters:
Name Type Description
target object | array

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 466)
Returns:

[description]

Type
Array.<Phaser.Tweens.Tween>

isTweening(target)

[description]

Parameters:
Name Type Description
target object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 514)
Returns:

[description]

Type
boolean

killAll()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 542)
Returns:

[description]

Type
Phaser.Tweens.TweenManager

killTweensOf(target)

[description]

Parameters:
Name Type Description
target object | array

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 562)
Returns:

[description]

Type
Phaser.Tweens.TweenManager

makeActive(tween)

[description]

Parameters:
Name Type Description
tween Phaser.Tweens.Tween

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 372)
Returns:

This Tween Manager object.

Type
Phaser.Tweens.TweenManager

pauseAll()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 584)
Returns:

[description]

Type
Phaser.Tweens.TweenManager

preUpdate()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 262)

resumeAll()

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 604)
Returns:

[description]

Type
Phaser.Tweens.TweenManager

setGlobalTimeScale(value)

[description]

Parameters:
Name Type Description
value number

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 624)
Returns:

[description]

Type
Phaser.Tweens.TweenManager

shutdown()

The Scene that owns this plugin is shutting down.
We need to kill and reset all internal properties as well as stop listening to Scene events.

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 641)

timeline(config)

Create a Tween Timeline and add it to the active Tween list/

Parameters:
Name Type Description
config object

[description]

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 162)
Returns:

[description]

Type
Phaser.Tweens.Timeline

update(timestamp, delta)

[description]

Parameters:
Name Type Description
timestamp number

[description]

delta number

The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.

Since: 3.0.0
Source: src/tweens/TweenManager.js (Line 340)