ofb/Assets/Scripts/ProgrammerHUDController.cs
slevy14 4b7bb231a9 added a way for the player to die and respawn, reconfigured test level
ALSO installed TMP but it has been giving me ISSUES
2023-04-13 16:52:11 -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] OLD_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);
}
}
}