Tween
Tween : TweenBase
Overview
The Tween class is a fundamental part of animating properties in game objects, providing a way to interpolate values over time using customizable easing styles and directions. It is widely used for creating smooth transitions and animations in game elements.
Description
The Tween class allows for seamless animations by interpolating properties such as position, color, size, and more over a specified duration. By leveraging the EasingStyle and EasingDirection properties, Tween animations can achieve dynamic motion effects that enhance user experience and interaction in applications.
Properties
TweenInfo
TweenInfo
The TweenInfo
property defines the duration, easing style, easing direction, repeat count, reverses, and delay time for the Tween animation. It is essential for customizing the characteristics of the animation.
Code Samples
Methods
Play
The Play
method starts or resumes the Tween animation, allowing the objectβs properties to transition smoothly toward the defined goals.
Parameters
Return
void
Code Samples
Cancel
The Cancel
method stops the Tween animation immediately and resets the properties to their initial state.
Parameters
Return
void
Code Samples
Pause
The Pause
method temporarily halts the Tween animation, allowing it to be resumed later without resetting.
Parameters
Return
void