Exemple #1
0
    void OnParticleCollision(GameObject other)
    {
        Flammable objectOnFire = other.GetComponent <Flammable> ();

        if (objectOnFire != null)
        {
            // Function returns a bool if the enemy was ignited
            objectOnFire.Ignited();
        }
    }