public void OnTriggerExit(Collider other) { Flame component = other.gameObject.GetComponent <Flame>(); if (component != null) { flammable.RemoveFlame(component); } Flammable component2 = other.gameObject.GetComponent <Flammable>(); if (component2 != null) { component2.RemoveFlammable(flammable); } FlammableExtinguisher component3 = other.gameObject.GetComponent <FlammableExtinguisher>(); if (component3 != null) { flammable.RemoveExtinguisher(component3); } }
public void RemoveExtinguisher(FlammableExtinguisher extinguisher) { extinguisherList.Add(extinguisher); }
public void AddExtinguisher(FlammableExtinguisher extinguisher) { extinguisherList.Add(extinguisher); heat -= extinguisher.cooling; }