BouncingValue
A class in Root.Township, the global namespace.
Server component that moves a value back and forth between 0 and 1 and reports it through an event every fixed update.
- Listed in Global namespace: A to B
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
BouncingValue() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private bool isIncreasing | Current direction. |
private float oneWayDuration | Seconds to go from 0 to 1 (5 by default). |
private IUnityUpdateMethod updateValue | Handle for the registered update. |
private float value | Current value, 0 to 1. |
private FloatUnityEvent valueUpdated | Event fired with the value each step. |