reckfellENGINE

Tween

Sequences of property changes, callbacks and timed steps.

On this page
class TweenReckfellSharpInherits RefCounted

Create a usable Tween through CreateTween() rather than new Tween(): the direct constructor emits a native error. Append commands before the first step. Commands are sequential by default; Parallel() groups the next append, SetParallel() changes the default, and Chain() starts the next step.

Pause() preserves progress; Stop() resets internal start/time but not properties; Kill() invalidates without Finished. Tree cleanup follows natural completion; create a new Tween for another animation.

BindEntity() manages lifecycle separately from a TweenProperty target. A property EntityPath such as position:x is not an Entity path. Ordinary callbacks run during Tween processing rather than on workers.

Manual CustomStep() after Pause is useful for deterministic checks. Current code still returns true on the step emitting Finished; the next call returns false. GetTotalElapsedTime() includes scaled delta and possible overshoot.

Windows headless checks confirm values, grouping and signals; visual quality, real frame rates, physics/tree-pause/time-scale transitions and precise subtween timing were not accepted here.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TweenConstructor
# Tween
C#
public Tween();

Direct new Tween() is not a usable animation: the native constructor emits an error and leaves an invalid object. Use Entity.CreateTween() or EntityTree.CreateTween() and append commands before the first step. SDK constructor availability is not a recommendation to call it.

Methods28

BindEntityTween
# BindEntity
C#
public Tween BindEntity(Entity node);

Binds lifecycle and Bound pause behavior to an Entity rather than setting every TweenProperty target. While the Entity is outside the tree, the sequence does not advance even through CustomStep. After object destruction tree processing ends the sequence. Entity.CreateTween binds automatically; EntityTree.CreateTween is configured separately.

Parameters
NameTypeDefault
nodeEntity—
node

Live binding-owner Entity, not necessarily every property target.

Returns Tween

The same Tween for chaining, not a new independent copy.

ChainTween
# Chain
C#
public Tween Chain();

Makes only the next appended Tweener start a new sequential step. Useful after SetParallel(true) to await the whole parallel group. Does not execute commands immediately or change the defaultParallel setting for every later append.

Returns Tween

The same Tween for chaining, not a new independent copy.

CustomStepbool
# CustomStep
C#
public bool CustomStep(double delta);

Manually advances by delta with SpeedScale, including while paused. Does not permanently Play the sequence or bypass a bound Entity needing tree membership. Do not call recursively within the same step. In 1.0.0 the step emitting Finished still returns true; the following call on the completed sequence returns false. Thus the bool is not an exact completion event. Pause before manual tests to avoid concurrent automatic advancement.

Parameters
NameTypeDefault
deltadouble—
delta

Positive finite manual seconds, then multiplied by SpeedScale.

Returns bool

Native step result; still true on the Finished-emitting step, false on the next completed-Tween call.

GetLoopsLeftint
# GetLoopsLeft
C#
public int GetLoopsLeft();

Remaining full passes including the current one. SetLoops(2) means two total passes rather than two additional repeats. Returns −1 for loops<=0 and 0 after finite completion. Not a time or step count.

Returns int

Remaining passes, −1 for infinite, 0 after finite completion.

GetTotalElapsedTimedouble
# GetTotalElapsedTime
C#
public double GetTotalElapsedTime();

Accumulated input delta with SpeedScale, including loops and overshoot in the final manual step. Not exact animation duration or wall-clock seconds. Stop resets it; Pause preserves it.

Returns double

Accumulated scaled delta, potentially exceeding actual duration.

HasTweenersbool
# HasTweeners
C#
public bool HasTweeners();

Checks for stored commands. Does not imply validity, running state or remaining work: Kill does not immediately clear the list, while later tree cleanup does.

Returns bool

True for a nonempty command list.

InterpolateValueVariant
# InterpolateValue
C#
public static Variant InterpolateValue(Variant initialValue, Variant deltaValue, double elapsedTime, double duration, Tween.TransitionType transType, Tween.EaseType easeType);

Statically computes Variant interpolation without creating a Tween or modifying an object. deltaValue is final minus initial, not the final value itself. duration=0 returns initialValue+deltaValue. Supply valid transition/ease enums and supported Variant types. This pass tested numeric scalars, not universal interpolation of arbitrary objects.

Parameters
NameTypeDefault
initialValueVariant—
deltaValueVariant—
elapsedTimedouble—
durationdouble—
transTypeTween.TransitionType—
easeTypeTween.EaseType—
initialValue

Initial value of a supported Variant type.

deltaValue

Final-minus-initial difference, not the final value.

elapsedTime

Position on the interpolation timeline, not a clock reading.

duration

Seconds duration; validate finiteness/nonnegativity. Zero in InterpolateValue yields the final value.

transType

Valid TransitionType for static interpolation.

easeType

Valid EaseType for static interpolation.

Returns Variant

Owned result Variant; dispose the wrapper after reading.

IsRunningbool
# IsRunning
C#
public bool IsRunning();

Returns the Play flag. False after Pause/Stop/Kill or finite completion. True alone proves neither validity nor progress this frame or an available bound object; also account for IsValid and pause behavior.

Returns bool

Advancement-enabled flag, not guaranteed validity/processing.

IsValidbool
# IsValid
C#
public bool IsValid();

Reports usability in the current sequence lifecycle. new Tween is invalid; Kill immediately makes this false. After natural Finished, tree cleanup can happen on a subsequent pass. Valid promises neither IsRunning nor permission to append after starting without Stop.

Returns bool

Usability flag in the current lifecycle.

Killvoid
# Kill
C#
public void Kill();

Stops and immediately invalidates the sequence, including its subtweens. Emits no Finished and restores no changed properties. Not equivalent to Pause: a killed sequence cannot resume through Play.

ParallelTween
# Parallel
C#
public Tween Parallel();

Makes only the next appended Tweener join the current step. Later additions again follow SetParallel. The step ends after its longest participant; this is animation-command parallelism, not OS threading.

Returns Tween

The same Tween for chaining, not a new independent copy.

Pausevoid
# Pause
C#
public void Pause();

Pauses automatic progression while preserving the step, time and properties. Play resumes; CustomStep can advance manually. Distinct from Stop, which resets internal start/time bookkeeping.

Playvoid
# Play
C#
public void Play();

Enables a valid Tween to advance after Pause/Stop. Revives no killed sequence and guarantees no processing while tree pause/bound membership blocks it. Create a new object after natural completion and cleanup.

SetEaseTween
# SetEase
C#
public Tween SetEase(Tween.EaseType ease);

Sets default easing for subsequently appended Property/MethodTweeners. Existing commands retain captured settings; use their own setters if needed. Changes neither duration nor processing mode.

Parameters
NameTypeDefault
easeTween.EaseType—
ease

Easing for subsequently appended commands.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetIgnoreTimeScaleTween
# SetIgnoreTimeScale
C#
public Tween SetIgnoreTimeScale(bool ignore = true);

Selects the tree unscaled delta for automatic processing. Does not bypass Pause, tree pause mode or bound lifecycle. CustomStep takes caller-supplied delta and separately applies SpeedScale. Actual automatic TimeScale behavior was source-reviewed rather than measured here.

Parameters
NameTypeDefault
ignorebooltrue
ignore

True selects unscaled delta during automatic processing.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetLoopsTween
# SetLoops
C#
public Tween SetLoops(int loops = 0);

Sets total passes: 1 means one, 2 means two. Calling without an argument defaults to 0 and enables infinite repetition, as do negative values. Provide real elapsed time or a stop condition: infinitely repeated zero-duration commands can trigger infinite-loop diagnostics.

Parameters
NameTypeDefault
loopsint0
loops

Total passes; <=0 means infinite.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetParallelTween
# SetParallel
C#
public Tween SetParallel(bool parallel = true);

Changes default grouping for later additions. True places them in one step; Chain starts a new step for the next addition. False restores sequential appending. Does not execute commands on separate threads.

Parameters
NameTypeDefault
parallelbooltrue
parallel

Default common-step appending mode, not thread startup.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetPauseModeTween
# SetPauseMode
C#
public Tween SetPauseMode(Tween.TweenPauseMode mode);

Sets tree-pause behavior: Bound follows the bound Entity, Stop stops advancing during tree pause, and Process permits it. Does not itself call Tween Pause/Play. Bound without binding creates no owner. Actual tree-pause transitions were source-reviewed only.

Parameters
NameTypeDefault
modeTween.TweenPauseMode—
mode

Bound/Stop/Process for tree-pause behavior.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetProcessModeTween
# SetProcessMode
C#
public Tween SetProcessMode(Tween.TweenProcessMode mode);

Selects Idle or Physics for automatic tree advancement. Physics makes neither a physics simulation nor an exact timing/sample-count guarantee. Manual CustomStep does not wait for that callback. Automatic physics processing was not executed here.

Parameters
NameTypeDefault
modeTween.TweenProcessMode—
mode

Idle or Physics for automatic stepping.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetSpeedScaleTween
# SetSpeedScale
C#
public Tween SetSpeedScale(float speed);

Multiplier for delta and accumulated time, not a replacement duration for every command. Normally supply a positive finite value; 2 advances time twice as fast. Zero advances no steps; negative is not reverse-playback support. Value 2 was tested with manual steps.

Parameters
NameTypeDefault
speedfloat—
speed

Time multiplier; use a positive finite value.

Returns Tween

The same Tween for chaining, not a new independent copy.

SetTransTween
# SetTrans
C#
public Tween SetTrans(Tween.TransitionType trans);

Sets default transition for future Property/MethodTweeners. Existing commands are not automatically reconfigured. Use Linear for linear interpolation; individual curves were not visually assessed here.

Parameters
NameTypeDefault
transTween.TransitionType—
trans

Transition for subsequently appended commands.

Returns Tween

The same Tween for chaining, not a new independent copy.

Stopvoid
# Stop
C#
public void Stop();

Stops and resets internal start/elapsed time while retaining commands. Restores no original properties and emits no Finished. At the next start a PropertyTweener may resample the already changed current value by default. While valid, Stop allows changing the list before restarting; after tree cleanup use a new Tween.

TweenAwaitAwaitTweener
# TweenAwait
C#
public AwaitTweener TweenAwait(Signal signal);

Appends a Signal wait, not a C# Task or retrospective wait for every earlier event. Connection is made when appended, but received resets when the step starts: early emission guarantees no later completion. Completion is observed on a subsequent step rather than synchronously completing the whole Tween. A destroyed source/missing connection also finishes this Tweener; completion does not prove a signal was received. Configure timeout on the returned AwaitTweener.

Parameters
NameTypeDefault
signalSignal—
signal

Signal from a live source; an early event before step start may be reset.

Returns AwaitTweener

Appended AwaitTweener for configuration; invalid use can yield null and diagnostics.

TweenCallbackCallbackTweener
# TweenCallback
C#
public CallbackTweener TweenCallback(Callable callback);

Appends a no-argument Callable invoked when its step is reached, not immediately on append. Retain required data/target; do not pass the result of an already invoked call. Callback is not automatically offloaded to a worker.

Parameters
NameTypeDefault
callbackCallable—
callback

Callable requiring no supplied arguments, invoked later.

Returns CallbackTweener

Appended CallbackTweener for configuration; invalid use can yield null and diagnostics.

TweenIntervalIntervalTweener
# TweenInterval
C#
public IntervalTweener TweenInterval(double time);

Appends a timed interval within the sequence, not a blocking main-thread sleep. Time is consumed by Tween steps and affected by speed/automatic time-scale policy. In a parallel group it is considered alongside the other participants.

Parameters
NameTypeDefault
timedouble—
time

Nonnegative finite interval duration in seconds.

Returns IntervalTweener

Appended IntervalTweener for configuration; invalid use can yield null and diagnostics.

TweenMethodMethodTweener
# TweenMethod
C#
public MethodTweener TweenMethod(Callable method, Variant from, Variant to, double duration);

Passes one interpolated value from from to to into the Callable on processing steps. Callback must accept the appropriate Variant type; not a property name. from/to are initial/final values, unlike InterpolateValue deltaValue. A double callback with Linear was tested; unknown types/call failures were not executed.

Parameters
NameTypeDefault
methodCallable—
fromVariant—
toVariant—
durationdouble—
method

Callable accepting one interpolated value.

from

Initial value; match type with to and callback.

to

Final value, not the from/to difference.

duration

Seconds duration; validate finiteness/nonnegativity. Zero in InterpolateValue yields the final value.

Returns MethodTweener

Appended MethodTweener for configuration; invalid use can yield null and diagnostics.

TweenPropertyPropertyTweener
# TweenProperty
C#
public PropertyTweener TweenProperty(ReckfellObject @object, EntityPath property, Variant finalVal, double duration);

Appends an object property change to finalVal. EntityPath here is a property/component path such as position:x, not an Entity tree path. The property must exist and types must match. By default the initial value is sampled when the command starts, which matters after Stop/delay. Providing a target alone does not automatically bind lifecycle; use BindEntity/Entity.CreateTween.

Parameters
NameTypeDefault
objectReckfellObject—
propertyEntityPath—
finalValVariant—
durationdouble—
object

Live object exposing the property, not an object name/path.

property

Property/component EntityPath, for example position:x.

finalVal

Final value compatible with the current property type.

duration

Seconds duration; validate finiteness/nonnegativity. Zero in InterpolateValue yields the final value.

Returns PropertyTweener

Appended PropertyTweener for configuration; invalid use can yield null and diagnostics.

TweenSubtweenSubtweenTweener
# TweenSubtween
C#
public SubtweenTweener TweenSubtween(Tween subtween);

Embeds a prepared Tween in the parent sequence and removes it from independent tree processing. At start the command resets the subtween with Stop and plays it; parent Kill propagates to children. Do not share one subtween between multiple owners or create cycles. Kill propagation was tested; precise subtween advancement was source-reviewed only.

Parameters
NameTypeDefault
subtweenTween—
subtween

Prepared sequence without cyclic/shared ownership.

Returns SubtweenTweener

Appended SubtweenTweener for configuration; invalid use can yield null and diagnostics.

Signals and events3

FinishedEvent
# Finished
C#
public event Action Finished;

Signal after the final pass of a finite sequence. Kill and Stop do not emit it. Infinite loops have no natural Finished. Tree cleanup invalidates the sequence; create a new Tween for another animation rather than relying on reusing the old one.

LoopFinishedEvent
# LoopFinished
C#
public event Tween.LoopFinishedEventHandler LoopFinished;

Emitted after a pass when another pass follows. A finite Tween final pass emits Finished instead. loopCount is the number of completed passes and starts at 1.

Handler parameters
NameTypeDefault
loopCountlong—
loopCount

Completed-pass count starting at 1; the final pass emits Finished.

StepFinishedEvent
# StepFinished
C#
public event Tween.StepFinishedEventHandler StepFinished;

Signal for completion of a zero-based step. A step may contain several parallel Tweeners and finishes after all of them. Does not mean the whole Tween completed; step indices repeat across loops.

Handler parameters
NameTypeDefault
idxlong—
idx

Completed-step index from 0, not a frame/loop index.

Tween.EaseType

ValueDescription
In = 0

The interpolation starts slowly and speeds up towards the end.

InOut = 2

A combination of Tween.EaseType.In and Tween.EaseType.Out. The interpolation is slowest at both ends.

Out = 1

The interpolation starts quickly and slows down towards the end.

OutIn = 3

A combination of Tween.EaseType.In and Tween.EaseType.Out. The interpolation is fastest at both ends.

Tween.TransitionType

ValueDescription
Back = 10

The animation is interpolated backing out at ends.

Bounce = 9

The animation is interpolated by bouncing at the end.

Circ = 8

The animation is interpolated with a function using square roots.

Cubic = 7

The animation is interpolated with a cubic (to the power of 3) function.

Elastic = 6

The animation is interpolated with elasticity, wiggling around the edges.

Expo = 5

The animation is interpolated with an exponential (to the power of x) function.

Linear = 0

The animation is interpolated linearly.

Quad = 4

The animation is interpolated with a quadratic (to the power of 2) function.

Quart = 3

The animation is interpolated with a quartic (to the power of 4) function.

Quint = 2

The animation is interpolated with a quintic (to the power of 5) function.

Sine = 1

The animation is interpolated using a sine function.

Spring = 11

The animation is interpolated like a spring towards the end.

Tween.TweenPauseMode

ValueDescription
Bound = 0

If the Tween has a bound node, it will process when that node can process (see Entity.ProcessMode). Otherwise it's the same as Tween.TweenPauseMode.Stop.

Process = 2

The Tween will process regardless of whether EntityTree is paused.

Stop = 1

If EntityTree is paused, the Tween will also pause.

Tween.TweenProcessMode

ValueDescription
Idle = 1

The Tween updates after each process frame (see Entity._Process).

Physics = 0

The Tween updates after each physics frame (see Entity._PhysicsProcess).

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.