LightFader
A class in Root.Township, the global namespace.
Fades a PlatformLight on and off along curves when IsLit changes, with an extra intensity multiplier. A component next to the light.
- Listed in Global namespace: I to L
- Inherits or implements
MonoBehaviour - Attributes
RequireComponent
Constructors
| Member | What it is |
|---|---|
LightFader() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private float baseIntensity | The light's intensity at start, the 1.0 point of the curves. |
private float currentUnmultipliedIntensity | Current faded intensity before Multiplier. |
private bool isLit | Backing field for IsLit. |
private AnimationCurve lightEndMultiplier | Curve used when fading out. |
private AnimationCurve lightStartMultiplier | Curve used when fading in. |
private float multiplier | Backing field for Multiplier. |
private PlatformLight target | The light being faded. |
Properties
| Member | What it is |
|---|---|
bool IsLit { get; set; } | Turns the light on or off with a fade. |
float Multiplier { get; set; } | Extra intensity multiplier applied on top of the fade. |
Methods
3 private and internal methods
Used in
Members of other types that take, return or hold a LightFader: