Beispiel #1
0
    void OnCollisionEnter(Collision collInfo)
    {
        Destroyable destScript = collInfo.collider.GetComponentInParent <Destroyable>();

        if (destScript)
        {
            destScript.Destruction();
        }
    }