Skip to main content

FireLighter

A class in Root.Township, Alta.Heat.

A trigger that tries to light any IFlammable collider that enters it, with a set chance.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private float chanceBacking field for Chance.

Properties​

MemberWhat 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
MemberWhat it is
private void OnTriggerEnter(Collider collider)Rolls against Chance and calls TryLight on the entering collider's IFlammable, if it has one.