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
| Member | What it is |
|---|
FireLogic() | Creates a FireLogic with default values. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private bool activatedByLogic | When false, logic input is ignored. Saved. |
private Fire fire | The fire this controls. |
private BoolUnityEvent onValueUpdated | Event fired with the fire's new state whenever it toggles. |
Methods
| Member | What 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
| Member | What it is |
|---|
private void Awake() | Hooks the fire's toggle event to onValueUpdated. |