A class in Root.Township, the global namespace.
Float modifier that moves its output toward the input value at a fixed speed, in fixed update.
Constructors
| Member | What it is |
|---|
MoveTowardsModifier() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private float currentValue | Current output value. |
private float speed | Units per second the value moves. |
private float target | Value being moved toward. |
private IUnityUpdateMethod update | Fixed update handle while moving. |
Methods
| Member | What it is |
|---|
override void Input(float value) | Sets a new target and starts moving if it changed. |
2 private and internal methods
| Member | What it is |
|---|
private void Awake() | Starts the target at the current value. |
private void MoveTowards() | Steps the value toward the target, outputs it, and stops once it arrives. |