Skip to main content

Tween<T>

Namespace: MonineEngine.Mathematics.Tweening

Generic class for tween instances. Eases a value within an object from one value to another over a period of time, using certain easing.

public class Tween<T> : Tween

Type Parameters

T

Inheritance ObjectTweenTween<T>

Properties

Member

The member to modify during the Tween<T>

public TweenMember<T> Member { get; }

Property Value

TweenMember<T>

StartValue

The value Tween<T>.Member starts at.

public T StartValue { get; private set; }

Property Value

T

EndValue

The value Tween<T>.Member will be at the end of the Tween<T>.

public T EndValue { get; }

Property Value

T

MemberName

public string MemberName { get; }

Property Value

String

Target

The target Object containing the member being tweened.

public object Target { get; }

Property Value

Object

Duration

Gets the duration of the Tween.

public float Duration { get; }

Property Value

Single

Delay

Gets the delay in seconds between each loop of the Tween.
This will only apply if TweenMethod is one of the following:

public float Delay { get; }

Property Value

Single

Method

The TweenMethod to use when executing this tween.

public TweenMethod Method { get; }

Property Value

TweenMethod

IsPaused

Gets or sets if the Tween is currently paused or not.

public bool IsPaused { get; set; }

Property Value

Boolean

IsComplete

Gets if the Tween has completed. If this Tween is set to loop, this will always be false.

public bool IsComplete { get; }

Property Value

Boolean

TimeRemaining

Gets the time remaining in seconds before the Tween completes. If this Tween is set to loop, this value will be reset to 0 on each loop.

public float TimeRemaining { get; }

Property Value

Single

Progress

Gets the completion progress of the Tween, between 0 (start of the Tween) and 1 (end of the Tween).

public float Progress { get; }

Property Value

Single

Methods

Initialize()

protected void Initialize()

UpdateValue(Single)

protected void UpdateValue(float t)

Parameters

t Single