Ejemplo n.º 1
0
    void OnTriggerEnter(Collider other)

    {
        if (other.tag == "Collect_gold" || other.tag == "Collect_wood" || other.tag == "Collect_stone")
        {
            Collectable script = (Collectable)other.GetComponent(typeof(Collectable));
            if (script.getIsEmpty())
            {
                dispSys.OpenMessagePanel("-No more ressources-");
            }
            else
            {
                dispSys.OpenMessagePanel("-Press P to gather-");
            }
            canCollect = true;
        }
        else if (other.tag == "village" && !manageMode)
        {
            dispSys.OpenMessagePanel("-Press M to manage-");
        }
    }