WaterfallEffectGenerator
A class in Root.Township, Alta.Forests.
River visual that puts a pooled waterfall effect and sound on every waterfall, shown only while its chunk is loaded.
- Listed in World generation
- Inherits or implements
MonoBehaviour,IRiverVisual - Documented in Forest
Constructors
| Member | What it is |
|---|---|
WaterfallEffectGenerator() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private bool btnRegenerate | Inspector button for Generate. |
private PooledObjectDefinition effect | Pooled waterfall effect. |
private RTPC heightRTPC | Wwise parameter set to the waterfall's drop. |
private AnimationCurve heightVolume | Obsolete. |
private Dictionary<PooledObject, Chunk> pooled | Spawned effects and the chunk each sits in. |
private RiverGenerator river | River generator. |
private RTPC sizeRTPC | Wwise parameter set to the waterfall's water volume. |
private AnimationCurve sizeVolume | Obsolete. |
private SoundEffectSet soundEffect | Waterfall sound. |
private List<AudioControl> sounds | Playing waterfall sounds. |
Methods
| Member | What it is |
|---|---|
void Generate(RiverGeneration generation) | Clears old effects, then adds an effect and a looping sound (sized by height and volume) for each waterfall. |