TweenRuntimeBehavior

TweenRuntimeBehavior

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.

Source:

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

Source:

(static) removeFromScene()

Static function to remove a Tweenable from a scene.

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

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

Source:

exists(identifier)

Tween exists.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

Returns:
Type Description

The tween exists

Source:

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)

Source:

hasFinished(identifier)

Tween has finished.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

Source:

isPlaying(identifier)

Tween is playing.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

Source:

pauseTween(identifier)

Pause a tween.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

Source:

removeTween(identifierFirst)

Remove a tween.

Parameters:
Name Type Description
identifierFirst

Unique id to idenfify the tween

Source:

resumeTween(identifier)

Resume a tween.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

Source:

stopTween(identifier, jumpToDest)

Stop a tween.

Parameters:
Name Type Description
identifier

Unique id to idenfify the tween

jumpToDest

Move to destination

Source: