Flamable.isIgnited C# (CSharp) Method

isIgnited() public method

public isIgnited ( ) : bool
return bool
    public bool isIgnited()
    {
        return flames_actual != null;
    }

Usage Example

Ejemplo n.º 1
0
    void DetermineIgniteOrExtinguish(GameObject col)
    {
        if (col.GetComponent <Substance>() != null && col.GetComponent <Substance>().isWater())
        {
            if (Extinguished != null)
            {
                Extinguished(this.gameObject);
            }

            Extinguish();
        }
        if (col.GetComponent("Flamable") == null)
        {
            return;
        }

        Flamable other_flamable = col.GetComponent("Flamable") as Flamable;

        if (other_flamable.isIgnited())
        {
            Ignite();
        }
    }