From 387b04f79c7f5b61849e9cbe5425f2eaf2f5deb9 Mon Sep 17 00:00:00 2001 From: WillJeynes Date: Thu, 27 Aug 2026 19:10:41 +0100 Subject: [PATCH] Add ability to note predictions on the side --- Assets/Scripts/DoorManager.cs | 9 +++++- Assets/Scripts/GuardManager.cs | 9 +++++- Assets/Scripts/StatusManager.cs | 14 +++++--- Assets/UIPrefabs/DoorInfoPanel.prefab | 45 ++++++++++++++++++++++++++ Assets/UIPrefabs/GuardInfoPanel.prefab | 45 ++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/DoorManager.cs b/Assets/Scripts/DoorManager.cs index c81f57a..3269075 100644 --- a/Assets/Scripts/DoorManager.cs +++ b/Assets/Scripts/DoorManager.cs @@ -93,7 +93,14 @@ public class DoorManager : MonoBehaviour, IDescribable public string GetDescribeName() { - return mod; + if (!string.IsNullOrEmpty(mod)) + { + return mod; + } + else + { + return "normal door"; + } } public string GetDescription() diff --git a/Assets/Scripts/GuardManager.cs b/Assets/Scripts/GuardManager.cs index 5e17965..c07c38e 100644 --- a/Assets/Scripts/GuardManager.cs +++ b/Assets/Scripts/GuardManager.cs @@ -144,7 +144,14 @@ public class GuardManager : MonoBehaviour, IDescribable public string GetDescribeName() { - return mod; + if (!string.IsNullOrEmpty(mod)) + { + return mod; + } + else + { + return "plain guard"; + } } public string GetDescription() diff --git a/Assets/Scripts/StatusManager.cs b/Assets/Scripts/StatusManager.cs index fbf474b..e3fc51a 100644 --- a/Assets/Scripts/StatusManager.cs +++ b/Assets/Scripts/StatusManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using TMPro; using UnityEngine; +using UnityEngine.UI; using Utils; public class StatusManager : Singleton @@ -32,12 +33,11 @@ public class StatusManager : Singleton PopulatePanel(doorPanelThoughts, doorPrefab, LevelLoader.Instance.Doors.Cast().ToList(),true, LevelLoader.Instance.GlobalModifier == "HIDE"); PopulatePanel(guardPanelThoughts, guardPrefab, LevelLoader.Instance.Guards.Cast().ToList(), true, false); - - //hide side pannel if cup global mod, or if only one guard - //add fallback to getdescribename - //actually implement the setting of predictions } + private Color[] colors = new Color[] { Color.white, Color.green, Color.red }; + private Dictionary cycles = new Dictionary(); + private void PopulatePanel(Transform panel, GameObject template, List items, bool interactableType, bool hide) { foreach (Transform child in panel) @@ -70,6 +70,12 @@ public class StatusManager : Singleton { titleMesh.text = item.GetDescribeName(); descMesh.text = "Click to set prediction"; + cycles[obj] = 0; + + obj.GetComponentInChildren