new TweenRuntimeBehavior(runtimeScene, behaviorData, owner)
Parameters:
Name | Type | Description |
---|---|---|
runtimeScene |
The runtime scene the behavior belongs to. |
|
behaviorData |
The data to initialize the behavior |
|
owner |
The runtime object the behavior belongs to. |
Methods
(static) makeNewTweenable()
Static function to create a Tweenable associated to a scene. Don't create manually shifty.Tweenable, otherwise they won't be associated to a scene (and will play even when scene is paused).
Returns:
Type | Description |
---|---|
The new tweenable |
(static) removeFromScene()
Static function to remove a Tweenable from a scene.
addObjectAngleTween(identifier, toAngle, easingValue, durationValue, destroyObjectWhenFinished)
Add an object angle tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toAngle |
The target angle |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectColorTween(identifier, toColorStr, easingValue, durationValue, destroyObjectWhenFinished)
Add an object color tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toColorStr |
The target color |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectHeightTween(identifier, toHeight, easingValue, durationValue, destroyObjectWhenFinished)
Add an object height tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toHeight |
The target height |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectOpacityTween(identifier, toOpacity, easingValue, durationValue, destroyObjectWhenFinished)
Add an object opacity tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toOpacity |
The target opacity |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectPositionTween(identifier, toX, toY, easingValue, durationValue, destroyObjectWhenFinished)
Add an object position tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toX |
The target X position |
|
toY |
The target Y position |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectPositionXTween(identifier, toX, easingValue, durationValue, destroyObjectWhenFinished)
Add an object X position tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toX |
The target X position |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectPositionYTween(identifier, toY, easingValue, durationValue, destroyObjectWhenFinished)
Add an object Y position tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toY |
The target Y position |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectScaleTween(identifier, toScaleX, toScaleY, easingValue, durationValue, destroyObjectWhenFinished)
Add an object scale tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toScaleX |
The target X-scale |
|
toScaleY |
The target Y-scale |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectScaleXTween(identifier, toScaleX, easingValue, durationValue, destroyObjectWhenFinished)
Add an object X-scale tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toScaleX |
The target X-scale |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectScaleYTween(identifier, toScaleY, easingValue, durationValue, destroyObjectWhenFinished)
Add an object scale y tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toScaleY |
The target Y-scale |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addObjectWidthTween(identifier, toWidth, easingValue, durationValue, destroyObjectWhenFinished)
Add an object width tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toWidth |
The target width |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addTextObjectCharacterSizeTween(identifier, toSize, easingValue, durationValue, destroyObjectWhenFinished)
Add a text object character size tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
toSize |
The target character size |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
addVariableTween(identifier, variable, fromValue, toVaue, easingValue, durationValue, destroyObjectWhenFinished)
Add an object variable tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
variable |
The object variable to store the tweened value |
|
fromValue |
Start value |
|
toVaue |
End value |
|
easingValue |
Type of easing |
|
durationValue |
Duration in milliseconds |
|
destroyObjectWhenFinished |
Destroy this object when the tween ends |
exists(identifier)
Tween exists.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
Returns:
Type | Description |
---|---|
The tween exists |
getProgress(identifier)
Get tween progress.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
Returns:
Type | Description |
---|---|
Progress of playing tween animation (between 0.0 and 1.0) |
hasFinished(identifier)
Tween has finished.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
isPlaying(identifier)
Tween is playing.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
pauseTween(identifier)
Pause a tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
removeTween(identifierFirst)
Remove a tween.
Parameters:
Name | Type | Description |
---|---|---|
identifierFirst |
Unique id to idenfify the tween |
resumeTween(identifier)
Resume a tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
stopTween(identifier, jumpToDest)
Stop a tween.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
Unique id to idenfify the tween |
|
jumpToDest |
Move to destination |