Show / Hide Table of Contents

Class ValueDurationAnimation<T>

A simple duration animation which only changes a value over time.

Inheritance
System.Object
DurationAnimationSequence
ValueDurationAnimation<T>
Implements
IAnmationSequence
Inherited Members
DurationAnimationSequence._duration
DurationAnimationSequence.StartManualAnimation()
DurationAnimationSequence.UpdateAnimation()
DurationAnimationSequence.ConstructCoroutine()
DurationAnimationSequence.Reverse()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: AnimationHelpers
Assembly: cs.temp.dll.dll
Syntax
public class ValueDurationAnimation<T> : DurationAnimationSequence, IAnmationSequence
Type Parameters
Name Description
T

The type of the value to animate

Constructors

ValueDurationAnimation(Single, Func<Single, T>, Boolean)

Create a new instance of ValueDurationAnimation

Declaration
public ValueDurationAnimation(float duration, Func<float, T> lerpFunction, bool reversed = false)
Parameters
Type Name Description
System.Single duration

The duration in seconds

Func<System.Single, T> lerpFunction

A function which takes a float as the parameter t of the interpolation and outputs the value T

System.Boolean reversed

If true start the animation in reversed state

Properties

CurrentValue

Returns the last calculated value.

Declaration
public T CurrentValue { get; }
Property Value
Type Description
T

Methods

AnimationStep(Single)

Declaration
protected override void AnimationStep(float t)
Parameters
Type Name Description
System.Single t
Overrides
DurationAnimationSequence.AnimationStep(Single)

CalculateCurrentValue(out Boolean)

Calculate the value for the current time. This will call UpdateAnimation and the returns the CurrentValue

Declaration
public T CalculateCurrentValue(out bool isActive)
Parameters
Type Name Description
System.Boolean isActive

false when the animation is finished

Returns
Type Description
T

The current value

Implements

IAnmationSequence
Back to top Generated by DocFX