|
@ -17,13 +17,17 @@ public class HidingSpot : MonoBehaviour { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void OnTriggerEnter(Collider other) { |
|
|
void OnTriggerEnter(Collider other) { |
|
|
if (other.gameObject.CompareTag("Player")) |
|
|
|
|
|
|
|
|
if (other.gameObject.CompareTag("Player")) { |
|
|
Searchlight.playerHidden = true; |
|
|
Searchlight.playerHidden = true; |
|
|
|
|
|
Debug.Log("player here"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void OnTriggerExit(Collider other) { |
|
|
void OnTriggerExit(Collider other) { |
|
|
if (other.gameObject.CompareTag("Player")) |
|
|
|
|
|
|
|
|
if (other.gameObject.CompareTag("Player")) { |
|
|
Searchlight.playerHidden = false; |
|
|
Searchlight.playerHidden = false; |
|
|
|
|
|
Debug.Log("player exit"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |