Skip to main content

FireLogic

A class in Root.Township, the global namespace.

Lets a logic signal light or put out a Fire, and reports the fire's on/off state as a bool event. Saved with the object.

Constructors​

MemberWhat it is
FireLogic()Creates a FireLogic with default values.

Fields​

3 private and internal fields
MemberWhat it is
private bool activatedByLogicWhen false, logic input is ignored. Saved.
private Fire fireThe fire this controls.
private BoolUnityEvent onValueUpdatedEvent fired with the fire's new state whenever it toggles.

Methods​

MemberWhat it is
void UpdateFire(bool value)If activatedByLogic is set, lights the fire on true and puts it out instantly on false.
1 private and internal method
MemberWhat it is
private void Awake()Hooks the fire's toggle event to onValueUpdated.