Exemplo n.º 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);
         * }*/
    }