TweenBase
Memory category | Instances |
---|
Member index 5
Description
Abstract base class for in-between interpolation handlers; parent class of Tween.
History 16
- 573 Change ReturnType of Play from void to null
- 573 Change ReturnType of Pause from void to null
- 573 Change ReturnType of Cancel from void to null
- 553 Change Default of PlaybackState from to
- 486 Change ThreadSafety of PlaybackState from ReadOnly to ReadSafe
- 462 Change ThreadSafety of Completed from to Unsafe
- 462 Change ThreadSafety of Play from to Unsafe
- 462 Change ThreadSafety of Pause from to Unsafe
- 462 Change ThreadSafety of Cancel from to Unsafe
- 462 Change ThreadSafety of PlaybackState from to ReadOnly
- 288 Add Completed
- 288 Add Play
- 288 Add Pause
- 288 Add Cancel
- 288 Add PlaybackState
- 288 Add TweenBase
Members 5
Cancel
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Halts playback of a Tween and resets the tween variables.
Only resets the tween variables, not the properties being changed by the tween. If you cancel a tween halfway through its animation, the properties do not reset to their original values. Differs from TweenBase:Pause() in that once resumed, it takes the full duration of the tween to complete the animation.
Thread safety | Unsafe |
---|
Completed
Parameters (1) | |
---|---|
playbackState | PlaybackState |
Fires when the tween finishes playing or when stopped with TweenBase:Cancel().
Passes the PlaybackState of the tween to any connected functions to
give an indication of why the tween ended. Note that calling
TweenBase:Pause() does not fire the Completed
event.
Thread safety | Unsafe |
---|
Pause
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Halts playback of the tween. Doesn't reset its progress variables, meaning that if you call TweenBase:Play(), the tween resumes playback from the moment it was paused.
If you want to reset the progress variables of the tween, use TweenBase:Cancel().
You can only pause tweens that are in the
PlaybackState of
Enum. PlaybackState.Playing
; tweens in other states won't pause. If a
tween is in a different PlaybackState such
as Enum. PlaybackState.Delayed
(as a result of its
TweenInfo.DelayTime being greater than 0), attempting to pause
the tween will fail and the tween will play following its specified delay
time.
Thread safety | Unsafe |
---|
Play
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Starts playback of a tween. Note that if playback has already started,
calling Play()
has no effect unless the tween has finished or is stopped
(either by TweenBase:Cancel() or TweenBase:Pause()).
Multiple tweens can be played on the same object at the same time, but they must not animate the same property. If two tweens attempt to modify the same property, the initial tween is cancelled and overwritten by the most recent tween (see examples).
Thread safety | Unsafe |
---|
PlaybackState
Type | Default | |
---|---|---|
PlaybackState |
Read-only property that shows the current stage for the Tween animation. See PlaybackState for descriptions of each state. Change using functions like Tween:Play().
Thread safety | ReadSafe |
---|---|
Category | Behavior |
Loaded/Saved | false/true |
History 4
- 553 Change Default of PlaybackState from to
- 486 Change ThreadSafety of PlaybackState from ReadOnly to ReadSafe
- 462 Change ThreadSafety of PlaybackState from to ReadOnly
- 288 Add PlaybackState