44 lines
1.1 KiB
C#
44 lines
1.1 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;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
UpdateText();
|
|
}
|
|
|
|
void UpdateText()
|
|
{
|
|
trumpetUI.text = "Can Trumpet?\n" + StateController.Instance.HasTrumpet();
|
|
clarinetUI.text = "Can Clarinet?\n" + StateController.Instance.HasClarinet();
|
|
cymbalUI.text = "Can Cymbal?\n" + StateController.Instance.HasCymbal();
|
|
tambourineUI.text = "Can Tambourine?\n" + StateController.Instance.HasTambourine();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
UpdateText();
|
|
|
|
if (Input.GetKeyDown(KeyCode.H))
|
|
{
|
|
programmerHUD.SetActive(!programmerHUD.activeSelf);
|
|
}
|
|
|
|
}
|
|
}
|