Class Tween¶
Namespace: Apogee.Scripting
Assembly: Apogee.Scripting.dll
An animation that tween.value, tween.property and tween.field start: a number, a vector, a colour (a linear-RGB vector) or a rotation (slerped) moving from one value to another over some
seconds, with an easing curve. It plays by itself, on the game clock (or the real clock with the unscaled option), stepped by
public sealed class Tween : EngineObject
Inheritance¶
object ← EngineObject ← Tween
Inherited Members¶
EngineObject.IsAdopted, EngineObject.Handle, EngineObject.IsDestroyed, EngineObject.Class, EngineObject.Adopt(), EngineObject.TryGet(SlotHandle, out EngineObject), EngineObject.Destroy(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Properties¶
Cancelled¶
Emitted once when the tween ends early:
public Signal Cancelled { get; }
Property Value¶
Class¶
What the registry knows about this object's class.
public override ClassInfo Class { get; }
Property Value¶
Completed¶
Emitted once when the tween ends by reaching its last value, after that value is written. A tween that repeats forever never emits it.
public Signal Completed { get; }
Property Value¶
Duration¶
The seconds one pass takes (not counting the delay or the repeats).
public double Duration { get; }
Property Value¶
Ease¶
The easing curve.
public Ease Ease { get; }
Property Value¶
Paused¶
True while the tween is paused with
public bool Paused { get; }
Property Value¶
Playing¶
True while the tween runs (it is not paused and has not ended).
public bool Playing { get; }
Property Value¶
Progress¶
How far the current pass has got, from 0 to 1, in time (the easing curve is not applied). It is 1 once the tween has completed.
public double Progress { get; }
Property Value¶
Methods¶
Cancel()¶
Stops the tween where it is: the value stays what the last step wrote, and cancelled is emitted. Does nothing once the tween has ended.
public void Cancel()
Complete()¶
Jumps to the end value (the last pass's: to, or from when the tween reverses an odd number of times), writes it and emits completed. For a tween that repeats forever it stops at to.
Does nothing once the tween has ended.
public void Complete()
Pause()¶
Holds the tween, delay included, until
public void Pause()
Resume()¶
Lets a paused tween go on from where it stopped.
public void Resume()