private void OnTriggerExit(Collider other) { if (other.CompareTag("Item")) { itemOnFloor = null; } else if (other.CompareTag("OpenInventory")) { display = null; } //else if(other.CompareTag("") }
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("") }