// Start is called before the first frame update private void OnTriggerEnter(Collider other) { if (other.tag == "RoomDetector") { PlayerInventoryAndStats.SetKey(true); } }
private void OnTriggerEnter(Collider other) { if (other.tag == "RoomDetector" && PlayerInventoryAndStats.GetKey()) { lockRoom.SetActive(false); } }