Skip to main content

FlintSpark

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​

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

Fields​

6 private and internal fields
MemberWhat it is
private float durationSeconds the spark lasts.
private float intensityMultiplierIntensity scale for the current spark.
private Gradient lightColorLight colour over the spark's life.
private AnimationCurve lightIntensityLight intensity over the spark's life.
private float minimumIntensityMultiplierIntensity scale for a hit with zero effectiveness.
private PlatformLight sparkLightThe light being animated.

Methods​

MemberWhat 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
MemberWhat it is
private IEnumerator UpdateVisual() (iterator)Coroutine that drives the light colour and intensity along the curves, then releases the object.