Show / Hide Table of Contents

Interface ITweenArithmeticPlugin<TValue>

Plugin providing calculations for a type.

Inherited Members
ITweenPlugin.Initialize(Tween, TweenPluginType, Object)
Namespace: Sttz.Tweener.Core
Assembly: cs.temp.dll.dll
Syntax
public interface ITweenArithmeticPlugin<TValue> : ITweenPlugin
Type Parameters
Name Description
TValue

Methods

DiffValue(TValue, TValue, ref Object)

Calculate the difference between start and end.

Declaration
TValue DiffValue(TValue start, TValue end, ref object userData)
Parameters
Type Name Description
TValue start

The start value

TValue end

The end value

System.Object userData

User data set by the loader

Returns
Type Description
TValue

The difference between start and end

EndValue(TValue, TValue, ref Object)

Calculate the end value.

Declaration
TValue EndValue(TValue start, TValue diff, ref object userData)
Parameters
Type Name Description
TValue start

The start value

TValue diff

The difference from start to end

System.Object userData

User data set by the loader

Returns
Type Description
TValue

The end value

ValueAtPosition(TValue, TValue, TValue, Single, ref Object)

Calculate the value at the given position.

Declaration
TValue ValueAtPosition(TValue start, TValue end, TValue diff, float position, ref object userData)
Parameters
Type Name Description
TValue start

The start value

TValue end

The end value

TValue diff

The difference from start to end

System.Single position

The normalized position between 0 and 1

System.Object userData

User data set by the loader

Returns
Type Description
TValue

The value at the given position

Remarks

Depending on the tween type, the user and the accessor plugin provide some combination of start, diff and end values. The arithmetic plugin is then asked via DiffValue(TValue, TValue, ref Object) and EndValue(TValue, TValue, ref Object) to calculate the missing values. Those values are only for the plugin itself and it can opt to not calculate them.

Back to top © 2018 Adrian Stutz