Tween
namespace Griff.Runtime;
public sealed class TweenA value animated over time, made with Tween or a behavior’s MoveTo, ScaleTo, RotateTo and FadeTo. Tweens run on game time, so they slow down with Scale and stop while the game is paused.
Properties
Section titled “Properties”Duration
Section titled “Duration”public float Duration { get; }Seconds from start to finish.
IsActive
Section titled “IsActive”public bool IsActive { get; }False once the tween has finished or was cancelled.
public Entity? Owner { get; }The entity whose removal cancels this tween, if any.
Methods
Section titled “Methods”Cancel
Section titled “Cancel”public void Cancel()Stops the tween where it is. Its Then action doesn’t run.
public Tween Then(Action action)Runs action when the tween finishes (not if it’s cancelled). Start another tween from it to chain them. Returns this tween.