Example #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "uva")
        {
            //Destroy(other.gameObject);

            agregar.agregarPuntaje(1);
            Destroy(other.gameObject);
        }

        if (other.gameObject.tag == "manzana")
        {
            //Destroy(other.gameObject);
            agregar.agregarPuntaje(2);
            Destroy(other.gameObject);
        }

        if (other.gameObject.tag == "frutaMiel")
        {
            //Destroy(other.gameObject);
            ganaste.mostrarGanar();
            //agregar.agregarPuntaje(2);
            Destroy(other.gameObject);
        }

        /*
         * if (other.gameObject.tag == "Tigre")
         * {
         *  Debug.Log("Me balaciaron los municipales");
         *  agregar.agregarPuntaje(2);
         * }*/
    }
Example #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "enemy1" /*|| other.gameObject.tag != "player"*/)
     {
         puntuacionScript.agregarPuntaje(valorPuntaje);
         Destroy(other.gameObject);
         Destroy(this.gameObject);
         //Debug.Log("disparando");
     }
     if (other.gameObject.tag != "player")
     {
         //Destroy(other.gameObject);
         Destroy(this.gameObject);
     }
 }