AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

Ease.Interpolate

Method  -  Static

public static byte Interpolate(Func func, byte start, byte end, float t)
public static sbyte Interpolate(Func func, sbyte start, sbyte end, float t)
public static short Interpolate(Func func, short start, short end, float t)
public static ushort Interpolate(Func func, ushort start, ushort end, float t)
public static char Interpolate(Func func, char start, char end, float t)
public static int Interpolate(Func func, int start, int end, float t)
public static uint Interpolate(Func func, uint start, uint end, float t)
public static long Interpolate(Func func, long start, long end, float t)
public static ulong Interpolate(Func func, ulong start, ulong end, float t)
public static float Interpolate(Func func, float start, float end, float t)
public static double Interpolate(Func func, double start, double end, float t)
public static Vector2i Interpolate(Func func, Vector2i start, Vector2i end, float t)
public static Vector2 Interpolate(Func func, Vector2 start, Vector2 end, float t)
public static Vector3 Interpolate(Func func, Vector3 start, Vector3 end, float t)
public static Vector4 Interpolate(Func func, Vector4 start, Vector4 end, float t)
public static Rect2i Interpolate(Func func, Rect2i start, Rect2i end, float t)
public static Rect Interpolate(Func func, Rect start, Rect end, float t)
public static Color Interpolate(Func func, Color start, Color end, float t)
public static Color32 Interpolate(Func func, Color32 start, Color32 end, float t)

Parameters

func Func Easing function
start byte Starting value
end byte End value
t float Time from 0.0 to 1.0

Returns

byte

Interpolated value

Description

Interpolate a value from the start to end by time t where at t = 0.0 the value is start and at t = 1.0 the value is end

Example

float t = 0;

public void Update()
{
    t += 0.01f;
    if (t > 1.0f) {
        t = 1.0f;
    }
}

public void Render()
{
    // Use CubicOut interpolation to animate a "poisoned" tint color on a character
    var color = Ease.Interpolate(Ease.Func.CubicOut, Color.white, Color.green, t);
    RB.TintColorSet(color);
    RB.DrawSprite("hero", pos);
}

See Docs

Features - Interpolation