Kiwi.Animations.Tweens.TweenManager Class
The TweenManager is automatically created on every game. This class is responsible for the creation and management of tweens for the game.
Based on tween.js by sole. Converted to TypeScript and integrated into Kiwi. https://github.com/sole/tween.js
Constructor
Kiwi.Animations.Tweens.TweenManager
-
game
-
[clock]
Parameters:
-
game
Kiwi.GameCurrent game
-
[clock]
Kiwi.Time.Clock optionalClock to use for tweens. Defaults to game.time.clock.
Returns:
Item Index
Methods
add
-
tween
Adds a tween to the manager.
Parameters:
-
tween
Kiwi.Animations.TweenThe tween that you want to add to the manager.
Returns:
create
-
object
Creates a new Tween.
Parameters:
-
object
AnyThe object that this tween is to apply.
Returns:
The tween that was created.
getAll
()
public
Returns all of tweens that are on the manager.
Returns:
Kiwi.Animations.Tween[]
objType
()
String
public
The type of object that this is.
Returns:
"TweenManager"
remove
-
tween
Removes a tween from this manager.
Parameters:
-
tween
Kiwi.Animations.TweenThe tween that you would like to remove.
Returns:
The tween passed in.
removeAll
()
public
Removes all of the tweens on the manager.
update
()
Boolean
public
The update loop.
Returns:
Whether anything was updated
validateClock
()
public
Validate clock; if no valid clock is found, set one from game