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);
        }
    }
Example #2
0
 public void RemoveExtinguisher(FlammableExtinguisher extinguisher)
 {
     extinguisherList.Add(extinguisher);
 }
Example #3
0
 public void AddExtinguisher(FlammableExtinguisher extinguisher)
 {
     extinguisherList.Add(extinguisher);
     heat -= extinguisher.cooling;
 }