Skip to main content

EnvironmentLerp

A class in Root.Township, the global namespace.

Blends audio environment values (reverb) from the current settings to a target EnvironmentNode. Owned by EnvironmentHandler.

Constructors​

MemberWhat it is
EnvironmentLerp(EnvironmentNode defaultEnvironment)Creates an EnvironmentLerp from defaultEnvironment.

Fields​

1 private and internal field
MemberWhat it is
private float progressHow far the blend has gone, 0 to 1.

Properties​

MemberWhat it is
EnvironmentNode Default { get; private set; }Environment used when SetEnvironment gets null.
EnvironmentLerp.Variable Reverb { get; }The blended reverb value.
EnvironmentNode Target { get; private set; }The environment being blended towards.

Events​

MemberWhat it is
event Action TargetChangedRaised when the target environment changes.

Methods​

MemberWhat it is
void SetEnvironment(EnvironmentNode environment, bool isSnapping)Sets the target environment (null means default) and raises TargetChanged. With snapping, jumps there at once.
bool Update(float amount)Advances the blend by the given amount. Returns true once it has passed the end.

Used in​

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