DayTimeEffect
A class in Root.Township, Alta.Environmental.Atmosphere.
Plays a particle system only by day or only by night. Client only: on a headless server it destroys itself.
- Listed in World, chunks and saving
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
DayTimeEffect() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Methods
3 private and internal methods
| Member | What it is |
|---|---|
private void OnDisable() | Stops listening for night changes. |
private void OnEnable() | On headless, destroys the particles and the object; otherwise listens for GameTimeManager.NightChanged and updates now. |
private void UpdateEnabled(bool isNight) | Plays or stops emitting depending on whether it's night and isActiveDuringDay. |