Skip to content

Class Lerps

Definition

Namespace: StardewUI.Animation
Assembly: StardewUI.dll

Common registration and lookup for interpolation functions.

public static class Lerps

Inheritance
Object ⇦ Lerps

Members

Methods

Name Description
Add<T>(Lerp<T>) Registers a new interpolation function, if there is not already a function for the same type.
Get<T>() Retrieves the interpolation function for a given type, if one is defined.

Details

Methods

Add<T>(Lerp<T>)

Registers a new interpolation function, if there is not already a function for the same type.

public static void Add<T>(StardewUI.Animation.Lerp<T> lerp);
Parameters

lerp   Lerp<T>
Interpolation function for the specified type.

Remarks

If an interpolation function is already known for the type T, the call is ignored.


Get<T>()

Retrieves the interpolation function for a given type, if one is defined.

public static StardewUI.Animation.Lerp<T> Get<T>();
Returns

Lerp<T>

The interpolation function for type T, or null if there is no known function for the given type.