menu
This commit is contained in:
@@ -41,8 +41,9 @@ namespace Ichni.Story
|
||||
|
||||
public void SetDialog(string dialogName)
|
||||
{
|
||||
string chapter = ChapterSelectionManager.instance.currentChapter.chapterName;
|
||||
string chapter = ChapterSelectionManager.instance.currentChapter.chapterIndex;
|
||||
TextAsset dialog = Resources.Load<TextAsset>("Story/" + chapter + "/Dialogs/" + dialogName);
|
||||
dialogUIPage.dialogContentFrame.ClearAllSentences();
|
||||
SetDialog(new List<TextAsset> { dialog });
|
||||
}
|
||||
|
||||
@@ -53,12 +54,10 @@ namespace Ichni.Story
|
||||
isPlayingDialog = true;
|
||||
|
||||
currentDialog = "NULL";
|
||||
|
||||
LoadDialog(dialogFiles, out string firstHeader);
|
||||
|
||||
Debug.Log($"Loaded dialog, first header: {firstHeader}");
|
||||
currentDialog = dialogParagraphName == "" ? firstHeader : dialogParagraphName;
|
||||
|
||||
Debug.Log($"Setting dialog to: {currentDialog}");
|
||||
}
|
||||
|
||||
public void PlayNextDialogParagraph(string nextDialog, bool invokeFunctions = true)
|
||||
@@ -138,6 +137,9 @@ namespace Ichni.Story
|
||||
{
|
||||
StoryManager.instance.storyline.currentBlock.state = StoryBlockState.Completed;
|
||||
isPlayingDialog = false;
|
||||
dialogUIPage.FadeOut();
|
||||
Debug.Log("Dialog completed, setting block state to Completed.");
|
||||
StoryManager.instance.storyline.SaveStoryline(ChapterSelectionManager.instance.currentChapter.chapterIndex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +147,7 @@ namespace Ichni.Story
|
||||
{
|
||||
string finalType;
|
||||
int max = 0;
|
||||
|
||||
Debug.Log($"Revealing dialog: {currentDialog}, currentFinalType: {currentFinalType}");
|
||||
do
|
||||
{
|
||||
finalType = currentFinalType;
|
||||
|
||||
Reference in New Issue
Block a user