44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using AibisDream.Kit;
|
|
using UnityEngine;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public class DialogUIManager : Singleton<DialogUIManager>
|
|
{
|
|
private CanvasGroup _canvasGroup;
|
|
|
|
[SerializeField] private LineRunner lineView;
|
|
[SerializeField] private OptionView optionView;
|
|
|
|
public override void OnSingletonInit()
|
|
{
|
|
_canvasGroup = GetComponent<CanvasGroup>();
|
|
}
|
|
|
|
public void CloseCanvas()
|
|
{
|
|
gameObject.SetActive(false);
|
|
}
|
|
|
|
public void OpenCanvas()
|
|
{
|
|
gameObject.SetActive(true);
|
|
}
|
|
|
|
public void HideDialog()
|
|
{
|
|
// 关闭所有对话框
|
|
BubbleGroup.Instance.HideDialog();
|
|
}
|
|
|
|
public void RegisterScreenView(DialogViewType dialogViewType, ILineView screenView)
|
|
{
|
|
lineView.RegisterView(dialogViewType, screenView);
|
|
}
|
|
|
|
public void UnRegisterScreenView(DialogViewType dialogViewType)
|
|
{
|
|
lineView.UnRegisterView(dialogViewType);
|
|
}
|
|
}
|
|
} |