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