summaryrefslogtreecommitdiff
path: root/Assets/Scripts/DEBUG_GrabbingDisplay.cs
diff options
context:
space:
mode:
authorSmallFox <2806143047@qq.com>2026-01-30 23:10:03 +0800
committerSmallFox <2806143047@qq.com>2026-01-30 23:10:03 +0800
commit28fbde36e76429bfb2bf577d9e3da77db745ef3d (patch)
tree03392014566a11be31f8bfe59b3a5416e7ce33a2 /Assets/Scripts/DEBUG_GrabbingDisplay.cs
parent87aacebb8431b402d6a18054a81c4542632008d7 (diff)
parentbdd0c3eee905c5dc6fcf22344f7fdbd4cc3e3a02 (diff)
Merge branch 'main' of catilgrass.cn:GameJamTemplate into dev_lys
Diffstat (limited to 'Assets/Scripts/DEBUG_GrabbingDisplay.cs')
-rw-r--r--Assets/Scripts/DEBUG_GrabbingDisplay.cs21
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";
+ }
+}