From 2dd782e72fe71625af5750019c63e963388520c8 Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 4 May 2023 14:17:57 -0700 Subject: [PATCH] actually fixed UI --- Assets/Scripts/GameUIController.cs | 4 ++-- Assets/Scripts/StateController.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Assets/Scripts/GameUIController.cs b/Assets/Scripts/GameUIController.cs index 070dba7..3d308bf 100644 --- a/Assets/Scripts/GameUIController.cs +++ b/Assets/Scripts/GameUIController.cs @@ -19,9 +19,9 @@ public class GameUIController : MonoBehaviour this.trumpetUI = trumpetBackground.transform.GetChild(0).gameObject; this.tambourineUI = tambourineBackground.transform.GetChild(0).gameObject; this.clarinetUI = clarinetBackground.transform.GetChild(0).gameObject; + } - - // TODO: This can be probably be combined with the update methods + void Start() { this.trumpetBackground.SetActive(StateController.Instance.HasTrumpet()); this.tambourineBackground.SetActive(StateController.Instance.HasTambourine()); this.clarinetBackground.SetActive(StateController.Instance.HasClarinet()); diff --git a/Assets/Scripts/StateController.cs b/Assets/Scripts/StateController.cs index 4213d96..43e2099 100644 --- a/Assets/Scripts/StateController.cs +++ b/Assets/Scripts/StateController.cs @@ -59,24 +59,24 @@ public class StateController : MonoBehaviour public bool HasTrumpet() { - return this.itemProgression >= UnlockedItems.Trumpet - 1; + return this.itemProgression >= UnlockedItems.Trumpet; } public bool HasTambourine() { - return this.itemProgression >= UnlockedItems.Tambourine - 1; + return this.itemProgression >= UnlockedItems.Tambourine; } public bool HasClarinet() { - return this.itemProgression >= UnlockedItems.Clarinet - 1; + return this.itemProgression >= UnlockedItems.Clarinet; } public bool HasCymbal() { - return this.itemProgression >= UnlockedItems.Cymbal - 1; + return this.itemProgression >= UnlockedItems.Cymbal; } void OnSceneLoaded(Scene scene, LoadSceneMode mode)