From bdd0c3eee905c5dc6fcf22344f7fdbd4cc3e3a02 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 30 Jan 2026 23:07:07 +0800 Subject: 完成双角色操纵 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/DEBUG_GrabbingDisplay.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Assets/Scripts/DEBUG_GrabbingDisplay.cs (limited to 'Assets/Scripts/DEBUG_GrabbingDisplay.cs') 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(); + } + + private void Update() + { + _text.text = playerControl.grabbing ? "Grabbing" : "Not Grabbing"; + } +} -- cgit