ofb/Assets/Scripts/ProgrammerHUDController.cs
2023-04-11 19:55:24 -07:00

41 lines
1.5 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class ProgrammerHUDController : MonoBehaviour {
// assigned in inspector
[SerializeField] TMP_Text trumpetUI;
[SerializeField] TMP_Text clarinetUI;
[SerializeField] TMP_Text tambourineUI;
[SerializeField] TMP_Text cymbalUI;
[SerializeField] TMP_Text stateText;
[SerializeField] GameObject programmerHUD;
[SerializeField] StateController stateController;
// Start is called before the first frame update
void Start() {
trumpetUI.text = "Can Trumpet?\n" + stateController.canTrumpet;
clarinetUI.text = "Can Clarinet?\n" + stateController.canClarinet;
cymbalUI.text = "Can Cymbal?\n" + stateController.canCymbal;
tambourineUI.text = "Can Tambourine?\n" + stateController.canTambourine;
stateText.text = "Current State:\n" + stateController.currentState;
}
// Update is called once per frame
void Update() {
trumpetUI.text = "Can Trumpet?\n" + stateController.canTrumpet;
clarinetUI.text = "Can Clarinet?\n" + stateController.canClarinet;
cymbalUI.text = "Can Cymbal?\n" + stateController.canCymbal;
tambourineUI.text = "Can Tambourine?\n" + stateController.canTambourine;
stateText.text = "Current State:\n" + stateController.currentState;
if (Input.GetKeyDown(KeyCode.H)) {
programmerHUD.SetActive(!programmerHUD.activeSelf);
}
}
}