ControlledRotateAndShake
A class in Root.Township, the global namespace.
Client: rotates a transform around X by a progress value and can shake it back and forth around Z for a random time.
- Listed in Global namespace: C to D
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
ControlledRotateAndShake() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
11 private and internal fields
| Member | What it is |
|---|---|
private Transform cachedTransform | The transform rotated. |
private float currentRotation | Current X rotation progress. |
private float currentShake | Current shake value, 0 to 1. |
private float currentShakeSpeed | Seconds per swing for the current shake. |
private MinMaxValue rotation | X angle range mapped from progress. |
private MinMaxValue shake | Z angle range mapped from the shake value. |
private int shakeDirection | 1 or -1, the way the shake is swinging. |
private MinMaxValue shakeDuration | Range for how long a shake lasts. |
private float shakeFinishTime | Real time when the shake stops. |
private MinMaxValue shakeSpeed | Range for seconds per swing. |
private IUnityUpdateMethod shakeUpdate | Handle for the registered shake update. |