Skip to main content

EnvironmentLerp.Variable

A class in Root.Township, the global namespace.

One float in an EnvironmentLerp that blends from a start value to a target.

Constructors​

MemberWhat it is
Variable()Creates an EnvironmentLerp.Variable with default values.

Properties​

MemberWhat it is
float From { get; private set; }Value the blend starts from.
float To { get; private set; }Target value.
float Value { get; private set; }Current blended value.

Events​

MemberWhat it is
event Action<float> ChangedRaised with the new value when it changes.

Methods​

MemberWhat it is
void Lerp(float lerp)Sets the value between From and To at the given fraction.
void SetTo(float target, bool isSnapping)Sets a new target. With snapping, jumps straight to it.

Used in​

Members of other types that take, return or hold a Variable: