mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 12:47:38 +02:00
f merge conflicts
This commit is contained in:
23
Assets/Scripts/LevelEditor/BPMText.cs
Normal file
23
Assets/Scripts/LevelEditor/BPMText.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
|
||||
namespace RhythmHeavenMania.Editor
|
||||
{
|
||||
public class BPMText : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text BPM;
|
||||
[SerializeField] private TMP_Text BPMRounded;
|
||||
public void ChangeText(float timePressed)
|
||||
{
|
||||
float thisBPM = 60 / timePressed; // BPM = 60/t
|
||||
BPM.text = $"{thisBPM}";
|
||||
BPMRounded.text = $"{Mathf.RoundToInt(thisBPM)}";
|
||||
}
|
||||
public void ResetText()
|
||||
{
|
||||
BPM.text = "---";
|
||||
BPMRounded.text = "---";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user