Method Tween
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>, Func<float>)
Tweens a value from start to finish over totalTime seconds.
[Version(2, 3, 0)]
public Coroutine Tween<T>(T start, T finish, float totalTime, Func<T, T, float, T> lerp, Action<T> action, Func<float> deltaTime)
Parameters
startTThe starting value.
finishTThe ending value.
totalTimefloatThe total duration of the tween in seconds.
lerpFunc<T, T, float, T>A function to interpolate between two values.
actionAction<T>A callback invoked each frame with the current interpolated value.
deltaTimeFunc<float>A function that returns the delta time for each frame.
Returns
- Coroutine
The started coroutine.
Type Parameters
TThe type of the value to tween.
Tween<T>(T, T, float, Func<T, T, float, T>, Action<T>)
Tweens a value from start to finish over totalTime seconds.
[Version(2, 3, 0)]
public Coroutine Tween<T>(T start, T finish, float totalTime, Func<T, T, float, T> lerp, Action<T> action)
Parameters
startTThe starting value.
finishTThe ending value.
totalTimefloatThe total duration of the tween in seconds.
lerpFunc<T, T, float, T>A function to interpolate between two values.
actionAction<T>A callback invoked each frame with the current interpolated value.
Returns
- Coroutine
The started coroutine.
Type Parameters
TThe type of the value to tween.