Skip to main content

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.

Constructors​

MemberWhat it is
WaterfallEffectGenerator()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

10 private and internal fields
MemberWhat it is
private bool btnRegenerateInspector button for Generate.
private PooledObjectDefinition effectPooled waterfall effect.
private RTPC heightRTPCWwise parameter set to the waterfall's drop.
private AnimationCurve heightVolumeObsolete.
private Dictionary<PooledObject, Chunk> pooledSpawned effects and the chunk each sits in.
private RiverGenerator riverRiver generator.
private RTPC sizeRTPCWwise parameter set to the waterfall's water volume.
private AnimationCurve sizeVolumeObsolete.
private SoundEffectSet soundEffectWaterfall sound.
private List<AudioControl> soundsPlaying waterfall sounds.

Methods​

MemberWhat 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.
1 private and internal method
MemberWhat it is
private void OnDestroy()Releases the effects and stops the sounds.