These archived docs are for Phaser 2.3.0 Phaser 3 docs can be found on
Phaser CE docs can be found on the Phaser CE Documentation site.


Phaser. TweenManager

new TweenManager(game)

Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated. Tweens are hooked into the game clock and pause system, adjusting based on the game state.

TweenManager is based heavily on tween.js by The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object. It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. Please see for a full list of contributors.

Name Type Description
game Phaser.Game

A reference to the currently running game.

Source code: tween/TweenManager.js (Line 20)

Public Properties

game : Phaser.Game

Local reference to game.

Source code: tween/TweenManager.js (Line 25)

Public Methods

add(tween) → {Phaser.Tween}

Add a new tween into the TweenManager.

Name Type Description
tween Phaser.Tween

The tween object you want to add.


The tween object you added to the manager.

Source code: tween/TweenManager.js (Line 176)

create(object) → {Phaser.Tween}

Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

Name Type Description
object object

Object the tween will be run on.


The newly created tween object.

Source code: tween/TweenManager.js (Line 190)

getAll() → {Array.<Phaser.Tween>}

Get all the tween objects in an array.

Array.<Phaser.Tween> -

Array with all tween objects.

Source code: tween/TweenManager.js (Line 101)

isTweening(object) → {boolean}

Checks to see if a particular Sprite is currently being tweened.

Name Type Description
object object

The object to check for tweens against.

boolean -

Returns true if the object is currently being tweened, false if not.

Source code: tween/TweenManager.js (Line 272)


Pauses all currently running tweens.

Source code: tween/TweenManager.js (Line 317)


Remove a tween from this manager.

Name Type Description
tween Phaser.Tween

The tween object you want to remove.

Source code: tween/TweenManager.js (Line 203)


Remove all tweens running and in the queue. Doesn't call any of the tween onComplete events.

Source code: tween/TweenManager.js (Line 112)

removeFrom(obj, children)

Remove all tweens from a specific object, array of objects or Group.

Name Type Argument Default Description
obj object | Array.<object> | Phaser.Group

The object you want to remove the tweens from.

children boolean <optional>

If passing a group, setting this to true will remove the tweens from all of its children instead of the group itself.

Source code: tween/TweenManager.js (Line 127)


Resumes all currently paused tweens.

Source code: tween/TweenManager.js (Line 331)

update() → {boolean}

Update all the tween objects you added to this manager.

boolean -

Return false if there's no tween to update, otherwise return true.

Source code: tween/TweenManager.js (Line 229)