本地化
This commit is contained in:
@@ -10,6 +10,7 @@ namespace AibisDream
|
||||
public class DialogController : Singleton<DialogController>
|
||||
{
|
||||
private DialogueRunner _dialogueRunner;
|
||||
private LocalisedLineProvider _lineProvider;
|
||||
|
||||
# region controller状态标识
|
||||
|
||||
@@ -45,6 +46,7 @@ namespace AibisDream
|
||||
private void Start()
|
||||
{
|
||||
_dialogueRunner = GetComponentInChildren<DialogueRunner>();
|
||||
_lineProvider = GetComponentInChildren<LocalisedLineProvider>();
|
||||
|
||||
_dialogueRunner.onDialogueStart.AddListener(() =>
|
||||
{
|
||||
@@ -58,7 +60,6 @@ namespace AibisDream
|
||||
OnDialogueComplete?.Invoke();
|
||||
IsTalking = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,6 +69,7 @@ namespace AibisDream
|
||||
public void StartDialog(YarnProject yarnProject)
|
||||
{
|
||||
_dialogueRunner.SetProject(yarnProject);
|
||||
_lineProvider.InitStringTable(yarnProject.name);
|
||||
_dialogueRunner.StartDialogue("Start");
|
||||
}
|
||||
|
||||
@@ -82,6 +84,7 @@ namespace AibisDream
|
||||
public void LoadDialog(YarnProject yarnProject)
|
||||
{
|
||||
_dialogueRunner.SetProject(yarnProject);
|
||||
_lineProvider.InitStringTable(yarnProject.name);
|
||||
_dialogueRunner.StartDialogue("Center");
|
||||
}
|
||||
|
||||
@@ -93,7 +96,7 @@ namespace AibisDream
|
||||
}
|
||||
}
|
||||
|
||||
public bool CheckIfNodeExistInCurrentYarnProject(string nodeName)
|
||||
private bool CheckIfNodeExistInCurrentYarnProject(string nodeName)
|
||||
{
|
||||
YarnProject currentProject = _dialogueRunner.yarnProject;
|
||||
string[] nodeNames = currentProject.NodeNames;
|
||||
|
||||
Reference in New Issue
Block a user