A class in Root.Township, the global namespace.
Client component for a particle system that turns it to face the main camera while it plays, for the length of the particle system.
Constructors
| Member | What it is |
|---|
BillboardParticle() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private float duration | How long to keep facing the camera, taken from the particle system. |
private Transform target | The local player's HeadFollow, watched for movement. |
Methods
4 private and internal methods
| Member | What it is |
|---|
private IEnumerator BillboardSystem() (iterator) | Coroutine: for duration seconds, looks at the camera whenever the player's head moved. Logs every time it turns. |
private void OnDisable() | Stops the coroutine. |
private void OnEnable() | Starts the billboard coroutine. |
private void OnValidate() | Editor: copies the duration from the particle system on the same object, or logs an error if there is none. |