mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 11:47:38 +02:00
make all dialogs inherit one base class
- opening a new dialog closes the previous one
This commit is contained in:
@ -4,9 +4,8 @@ using UnityEngine;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class TempoFinder : MonoBehaviour
|
||||
public class TempoFinder : Dialog
|
||||
{
|
||||
[SerializeField] private GameObject tempoFinder;
|
||||
private bool pressed;
|
||||
private float timePressed;
|
||||
[SerializeField] private BPMText bpmText;
|
||||
@ -17,12 +16,13 @@ namespace HeavenStudio.Editor
|
||||
}
|
||||
public void SwitchTempoDialog()
|
||||
{
|
||||
if(tempoFinder.activeSelf) {
|
||||
tempoFinder.SetActive(false);
|
||||
if(dialog.activeSelf) {
|
||||
dialog.SetActive(false);
|
||||
timePressed = 0;
|
||||
bpmText.ResetText();
|
||||
} else {
|
||||
tempoFinder.SetActive(true);
|
||||
ResetAllDialogs();
|
||||
dialog.SetActive(true);
|
||||
}
|
||||
}
|
||||
public void TapBPM()
|
||||
|
Reference in New Issue
Block a user