ACTUALLY FIXED BROKEN COMMIT

pull this one!
This commit is contained in:
Sam
2023-05-01 17:30:54 -07:00
parent 071a9b43d4
commit fc8c2e6062
2 changed files with 14 additions and 4 deletions

View File

@@ -18,12 +18,16 @@ public class GameUIController : MonoBehaviour
private StateController stateController;
void Start() {
stateController = GameObject.FindGameObjectWithTag("StateController").GetComponent<StateController>();
if (stateController == null) {
print("state controller not found");
} else {
print("yeehaw");
}
trumpetUI = trumpetBackground.transform.GetChild(0).gameObject;
tambourineUI = tambourineBackground.transform.GetChild(0).gameObject;
clarinetUI = clarinetBackground.transform.GetChild(0).gameObject;
stateController = GameObject.FindGameObjectWithTag("StateController").GetComponent<StateController>();
if (!stateController.unlockedTrumpet) {
trumpetBackground.SetActive(false);
}
@@ -57,6 +61,9 @@ public class GameUIController : MonoBehaviour
}
public void ResetInstrumentUI() {
if (stateController == null) {
print("state controller null");
}
if (stateController.unlockedTrumpet) {
ToggleTrumpet(true);
}