make all dialogs inherit one base class

- opening a new dialog closes the previous one
This commit is contained in:
minenice55
2022-08-26 23:43:01 -04:00
parent 6c80073b12
commit 2b4b7f0a73
10 changed files with 345 additions and 51 deletions

View File

@ -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()