From 7f493f682503f5186308de7b8f74b5b49233cfe4 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Thu, 2 Nov 2023 11:51:31 +0800 Subject: +init --- GameCode/DebugCoinDisplay.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 GameCode/DebugCoinDisplay.cs (limited to 'GameCode/DebugCoinDisplay.cs') diff --git a/GameCode/DebugCoinDisplay.cs b/GameCode/DebugCoinDisplay.cs new file mode 100644 index 0000000..b2f021d --- /dev/null +++ b/GameCode/DebugCoinDisplay.cs @@ -0,0 +1,19 @@ +using TMPro; +using UnityEngine; + +public class DebugCoinDisplay : MonoBehaviour +{ + public TextMeshProUGUI target; + + private PlayerInteraction player; + + private void Start() + { + player = Object.FindObjectOfType(); + } + + private void Update() + { + target.text = player.Balance.ToString(); + } +} -- cgit v1.1-26-g67d0