mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 00:27:40 +02:00
Fixed problem with Trio faces not changing
This commit is contained in:
52
Assets/Scripts/DebugUI.cs
Normal file
52
Assets/Scripts/DebugUI.cs
Normal file
@ -0,0 +1,52 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using TMPro;
|
||||
|
||||
|
||||
// hardcoded because im lazy
|
||||
namespace RhythmHeavenMania
|
||||
{
|
||||
public class DebugUI : MonoBehaviour
|
||||
{
|
||||
public GameObject Template;
|
||||
|
||||
private TMP_Text SongPosBeats;
|
||||
private TMP_Text BPM;
|
||||
private TMP_Text currEvent;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
GameObject debug = Instantiate(Template, Template.transform.parent);
|
||||
debug.SetActive(true);
|
||||
debug.transform.localPosition = new Vector3(Template.transform.localPosition.x, Template.transform.localPosition.y - 44.9301f * i);
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
SongPosBeats = debug.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||
break;
|
||||
case 1:
|
||||
BPM = debug.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||
break;
|
||||
case 2:
|
||||
currEvent = debug.transform.GetChild(0).GetComponent<TMP_Text>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
SongPosBeats.text = $"SongPosBeats: {Conductor.instance.songPositionInBeats}";
|
||||
BPM.text = $"BPM: {Conductor.instance.songBpm}";
|
||||
if (GameManager.instance.currentEvent - 1 >= 0)
|
||||
currEvent.text = $"CurrentEvent: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent - 1].datamodel}";
|
||||
else
|
||||
currEvent.text = $"CurrentEvent: {GameManager.instance.Beatmap.entities[GameManager.instance.currentEvent].datamodel}";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user