Spelunx Cavern SDK
 
Loading...
Searching...
No Matches
TrackingArea.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class TrackingArea : MonoBehaviour
4{
5 private bool crouching = false;
6
7 public bool Crouching()
8 {
9 return crouching;
10 }
11
12 private void OnTriggerEnter(Collider other)
13 {
14 if (other.CompareTag("CrouchArea"))
15 {
16 Debug.Log("Crouching");
17 crouching = true;
18 }
19 }
20
21 private void OnTriggerExit(Collider other)
22 {
23 if (other.CompareTag("CrouchArea"))
24 {
25 Debug.Log("Not crouching");
26 crouching = false;
27 }
28 }
29}
bool Crouching()
Definition: TrackingArea.cs:7