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