Skip to main content

FloatModifier

An abstract class in Root.Township, the global namespace.

Base for components that take a float, change it and pass it on through a float event. Subclasses include LerpModifier and MoveTowardsModifier.

Constructors​

MemberWhat it is
protected FloatModifier()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private FloatEvent outputEvent that receives the modified value.

Methods​

MemberWhat it is
abstract void Input(float value)Receives a new input value. Subclasses decide when and what to output.
protected void Output(float value)Invokes the output event with a value.