UITween(float, float, float, Action, Func) Constructor
Definition
Namespace: Brine2D.UI
Creates a new tween.
C#
public UITween(float from, float to, float duration, System.Action<float> setter, System.Func<float,float>? easing=null);
Parameters
from System.Single
Start value.
End value.
duration System.Single
Duration in seconds. Must be > 0.
setter System.Action<System.Single>
Called each frame with the current animated value.
easing System.Func<System.Single,System.Single>
Easing function accepting normalised time [0,1] and returning normalised progress.
Any method from UIEasing or a custom lambda works.
Defaults to Brine2D.UI.UIEasing.Linear\(System\.Single\) when null.