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,24 +4,23 @@ using UnityEngine;
using HeavenStudio.Editor;
public class NewRemixDialog : MonoBehaviour
public class NewRemixDialog : Dialog
{
[SerializeField] private GameObject diag;
public void SwitchNewDialog()
{
if(diag.activeSelf) {
diag.SetActive(false);
if(dialog.activeSelf) {
dialog.SetActive(false);
} else {
diag.SetActive(true);
ResetAllDialogs();
dialog.SetActive(true);
}
}
public void Confirm()
{
Editor.instance.NewRemix();
if(diag.activeSelf) {
diag.SetActive(false);
if(dialog.activeSelf) {
dialog.SetActive(false);
}
}
}