A class in Root.Township, the global namespace.
Pooled spark light effect for flint strikes. Fades the light over its duration, then returns to the pool. Client visual.
Constructors
| Member | What it is |
|---|
FlintSpark() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
6 private and internal fields
| Member | What it is |
|---|
private float duration | Seconds the spark lasts. |
private float intensityMultiplier | Intensity scale for the current spark. |
private Gradient lightColor | Light colour over the spark's life. |
private AnimationCurve lightIntensity | Light intensity over the spark's life. |
private float minimumIntensityMultiplier | Intensity scale for a hit with zero effectiveness. |
private PlatformLight sparkLight | The light being animated. |
Methods
| Member | What it is |
|---|
void ForcedTrigger() | Plays the spark at full intensity. Used by the fly cam's spark. |
void Trigger(ImpactHit hit) | Impact effect entry: plays the spark with intensity scaled by the hit's effectiveness. |
1 private and internal method
| Member | What it is |
|---|
private IEnumerator UpdateVisual() (iterator) | Coroutine that drives the light colour and intensity along the curves, then releases the object. |