A class in Root.Township, Alta.Heat.
A trigger that tries to light any IFlammable collider that enters it, with a set chance.
Constructors
| Member | What it is |
|---|
FireLighter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private float chance | Backing field for Chance. |
Properties
| Member | What it is |
|---|
float Chance { get; set; } | Probability from 0 to 1 that an entering collider gets TryLight called. Default 1. |
Methods
1 private and internal method
| Member | What it is |
|---|
private void OnTriggerEnter(Collider collider) | Rolls against Chance and calls TryLight on the entering collider's IFlammable, if it has one. |