mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 16:57:39 +02:00
make all dialogs inherit one base class
- opening a new dialog closes the previous one
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user