KernelAPI reference
Class Tweener
Namespace: MicroEngine.Scenes
Assembly: MicroEngine.dll
Guide: Scenes
Simple value tweens driven by update time.
public sealed class Tweener : IStateHashedInheritance
Implements
Constructors
Tweener()
public Tweener()Properties
Count
Number of tweens playing or waiting for their delay.
public int Count { get; }Property Value
Methods
Add(float, Action<float>, Func<float, float>?, Action?, float)
Calls apply with eased progress 0..1 every update for duration seconds.
public void Add(float duration, Action<float> apply, Func<float, float>? ease = null, Action? done = null, float delay = 0)Parameters
duration float
done Action?
delay float
Clear()
Removes every tween without applying its final value or calling its done callback.
public void Clear()HashState(StateHasher)
Adds the tweens’ state to the per-step state hash: for each tween, its duration, time played and delay left.
public void HashState(StateHasher hash)Parameters
hash StateHasher
Update(float)
Advances every tween by dt seconds and calls the done callback of those that ended. A scene calls this for its own Tweens.
public void Update(float dt)Parameters
dt float