对话系统第一次修改
This commit is contained in:
@@ -19,9 +19,6 @@ namespace AibisDream
|
||||
|
||||
# endregion
|
||||
|
||||
public static UnityAction OnDialogueStart;
|
||||
public static UnityAction OnDialogueComplete;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_dialogueRunner = GetComponentInChildren<DialogueRunner>();
|
||||
@@ -29,16 +26,16 @@ namespace AibisDream
|
||||
|
||||
_dialogueRunner.onDialogueStart.AddListener(() =>
|
||||
{
|
||||
EnumEventSystem.Global.Send(InteractionEventEnum.End);
|
||||
OnDialogueStart?.Invoke();
|
||||
EnumEventSystem.Global.Send(InteractionEventEnum.DialogEnd);
|
||||
});
|
||||
_dialogueRunner.onDialogueComplete.AddListener(() =>
|
||||
{
|
||||
EnumEventSystem.Global.Send(InteractionEventEnum.Start);
|
||||
OnDialogueComplete?.Invoke();
|
||||
EnumEventSystem.Global.Send(InteractionEventEnum.DialogStart);
|
||||
});
|
||||
}
|
||||
|
||||
#region Yarn控制
|
||||
|
||||
/// <summary>
|
||||
/// 开启对话
|
||||
/// </summary>
|
||||
@@ -49,12 +46,7 @@ namespace AibisDream
|
||||
_lineProvider.InitStringTable(yarnProject.name);
|
||||
_dialogueRunner.StartDialogue("Start");
|
||||
}
|
||||
|
||||
public string GetCurLocalizedTableName()
|
||||
{
|
||||
return _lineProvider.GetStringTableName();
|
||||
}
|
||||
|
||||
|
||||
public void StopDialog()
|
||||
{
|
||||
_dialogueRunner.Stop();
|
||||
@@ -84,7 +76,7 @@ namespace AibisDream
|
||||
_dialogueRunner.StartDialogue(nodeName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private bool CheckIfNodeExistInCurrentYarnProject(string nodeName)
|
||||
{
|
||||
YarnProject currentProject = _dialogueRunner.yarnProject;
|
||||
@@ -100,6 +92,8 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 跳到下一句
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user