Esempio n. 1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        //Debug.Log("Enter in trigger " + collision.gameObject.tag);
        conlision_tag_etected = "None";

        if (collision.gameObject.CompareTag("Ressource"))
        {
            //Debug.Log("display help");

            colision_ressource = collision.gameObject;
            colision_ressource.GetComponent <Resource>().display_help();
            conlision_tag_etected = "Ressource";
        }
        else if (collision.gameObject.CompareTag("cauldron_triger"))
        {
            //Debug.Log("displays help cauldron");
            cauldron.display_help_cauldron();
            conlision_tag_etected = "cauldron_triger";
        }
    }