Skip to main content

CaveAmbience

A class in Root.Township, Alta.Environmental.Atmosphere.

Atmosphere plugin for caves: a fixed ambient colour, fog colour and density, and objects (such as the sky) hidden while it's active.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private Color caveAmbienceAmbient colour in caves.
private Color caveFogColorFog colour in caves.
private float fogDensityFog density in caves.
private GameObject[] toDisableObjects hidden while the cave ambience is active.

Properties​

MemberWhat it is
override Color CurrentAmbience { get; }The cave ambient colour.
override Color CurrentFog { get; }The cave fog colour.
override float CurrentFogDensity { get; }The cave fog density.

Methods​

MemberWhat it is
override void Disable()Turns the hidden objects back on.
protected override void Enabled()If it has priority, hides toDisable and blends ambient, fog colour and density to the cave values.
protected override void Reenabled()Blends back to the cave ambient colour if nothing overrides it.