Esempio n. 1
0
    void OnCollisionEnter(Collision collision)
    {
        Collider col = collision.collider;

        Debug.Log("Collision detected between " + gameObject.name + " and " + col.name);

        DeathScript ds = col.gameObject.GetComponent <DeathScript> ();

        if (ds != null)
        {
            ds.Kill();
        }
    }