遮罩问题
This commit is contained in:
@@ -9,6 +9,8 @@ namespace AibisDream
|
||||
{
|
||||
public class DialogController : Singleton<DialogController>
|
||||
{
|
||||
private const string BookManager = "BookManager";
|
||||
|
||||
private DialogueRunner dialogueRunner;
|
||||
|
||||
private VariableStorageBehaviour _variableStorage;
|
||||
@@ -35,6 +37,9 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
// 对话框被阻塞时不能继续对话框交互
|
||||
public bool IsBlock { get; set; }
|
||||
|
||||
public static UnityAction OnDialogueStart;
|
||||
public static UnityAction OnDialogueComplete;
|
||||
|
||||
@@ -44,7 +49,12 @@ namespace AibisDream
|
||||
{
|
||||
dialogueRunner = GetComponentInChildren<DialogueRunner>();
|
||||
_variableStorage = GetComponentInChildren<InMemoryVariableStorage>();
|
||||
|
||||
|
||||
// 开关书交互
|
||||
BookManager bookManager = GameObject.Find(BookManager).gameObject.GetComponent<BookManager>();
|
||||
bookManager.OnBookClosed += () => { IsBlock = false; };
|
||||
bookManager.OnBookOpen += () => { IsBlock = true; };
|
||||
|
||||
dialogueRunner.onDialogueStart.AddListener(() => { OnDialogueStart?.Invoke(); });
|
||||
dialogueRunner.onDialogueComplete.AddListener(() => { OnDialogueComplete?.Invoke(); });
|
||||
dialogueRunner.AddCommandListener(_ => { IsTalking = false; });
|
||||
|
||||
Reference in New Issue
Block a user