Class TweensHandler
A singleton used to keep track of every Tween created with Str8Tween. Updates alive ones and removes the dead ones on every frame.
Properties
Instance
type : TweensHandler
Returns the instance of the TweensHandler singleton.
tweens
type : System.Collections.Generic.Dictionary<String, Tween>
Returns the tweens stored in the class. The key is the tweens's UUID and the value is the Tween itself.
Methods
Add(Tween)
Adds the Tween passed in parameters to the tweens dictionary
Parameters
t (Tween) | The Tween to add. |
Examples
using UnityEngine;
using Str8lines.Tweening;
public class MyClass : MonoBehaviour
{
public RectTransform rectTransform;
private void Start()
{
Vector3 destination = new Vector3(0, 500);
Tween t = new Tween("move", rectTransform, destination, EasingFunction.Linear, 3f);
TweensHandler.Instance.Add(t);
}
}