コード例 #1
0
    private void OnTriggerExit(Collider other)
    {
        if (other.CompareTag("Item"))
        {
            itemOnFloor = null;
        }

        else if (other.CompareTag("OpenInventory"))
        {
            display = null;
        }
        //else if(other.CompareTag("")
    }
コード例 #2
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag("Item"))
        {
            itemOnFloor = other.GetComponent <ItemObj>();
        }

        else if (other.CompareTag("OpenInventory"))
        {
            display = other.GetComponent <DisplayCase>();
        }
        //else if(other.CompareTag("")
    }