Beispiel #1
0
    private void OnTriggerExit(Collider other)
    {
        if (other.gameObject.tag == "Plot")
        {
            plotInRange = false;
            plotController.Deselect();
        }

        else if (other.gameObject.tag == "Merchant")
        {
            marketInRange = false;
            market.Deselect();
        }

        else if (other.gameObject.tag == "Mixer")
        {
            mixerInRange = false;
            mixer.Deselect();
        }
        else if (other.gameObject.tag == "Table")
        {
            tableInRange = false;
            table.gameObject.GetComponent <Table>().Deselect();
        }
        else if (other.gameObject.tag == "Item" && other.gameObject.transform.parent == null)
        {
            itemInRange = false;
            itemInWorld.Deselect();
        }
    }