private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "enemigo")
        {
            vida.quitarVida(1);
            Debug.Log("Hizo contacto con Enemigo");
            //Destroy(this.gameObject);
        }

        if (other.gameObject.tag == "Tigre")
        {
            //zarpazo.Play();
            Debug.Log("Zarpazo de tigre en colisionEnemigo");
            //vida.quitarVida(1);
        }

        if (other.gameObject.tag == "gota")
        {
            vida.quitarVida(1);
            Destroy(other.gameObject);
        }

        if (other.gameObject.tag == "cokito")
        {
            vida.quitarVida(1);
            Destroy(other.gameObject);
        }
    }
 private void OnControllerColliderHit(ControllerColliderHit hit)
 {
     if (hit.gameObject.tag == "enemy1")
     {
         laifuActual.quitarVida(restarVida);
         Destroy(hit.gameObject);
     }
 }
Beispiel #3
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Tigre")
     {
         Debug.Log("Me balaciaron los municipales");
         quitar.quitarVida(1);
     }
 }