Example #1
0
    void OnTriggerEnter(Collider col)
    {
        DamageParent plane = col.gameObject.GetComponent <DamageParent>();

        if (plane)
        {
            plane.mapOut();
        }
    }
Example #2
0
 void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.name != tr.name)
     {
         DamageParent planeScript = col.gameObject.GetComponent <DamageParent>();
         if (planeScript)
         {
             string name = tr.name;
             planeScript.SetDamage(damage, name);
         }
         Destroy(gameObject);
     }
 }