Ejemplo n.º 1
0
    private void OnCollisionEnter(Collision collision)
    {
        IInteract object_Hit = collision.gameObject.GetComponent <IInteract>();

        if (object_Hit != null)
        {
            object_Hit.heal(20);

            theManager.IveBeenDestroyed(this);
            Destroy(gameObject);

            /*if (object_Hit is vehicle)
             * {
             *  ((vehicle)object_Hit).no_You_see_me();
             * }*/
        }
    }