diff options
Diffstat (limited to 'Assets/Scripts/DEBUG_GrabbingDisplay.cs')
| -rw-r--r-- | Assets/Scripts/DEBUG_GrabbingDisplay.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Assets/Scripts/DEBUG_GrabbingDisplay.cs b/Assets/Scripts/DEBUG_GrabbingDisplay.cs new file mode 100644 index 0000000..0bb1cf5 --- /dev/null +++ b/Assets/Scripts/DEBUG_GrabbingDisplay.cs @@ -0,0 +1,21 @@ +using System; +using TMPro; +using UnityEngine; + +[RequireComponent(typeof(TMP_Text))] +public class DebugGrabbingDisplay : MonoBehaviour +{ + public PlayerControl playerControl; + + private TMP_Text _text; + + private void Awake() + { + _text = GetComponent<TMP_Text>(); + } + + private void Update() + { + _text.text = playerControl.grabbing ? "Grabbing" : "Not Grabbing"; + } +} |
