private void ShowNextDialog() { this._dialogIndex++; if (this._currentChatCoroutine != null) { Singleton <LevelManager> .Instance.levelEntity.StopCoroutine(this._currentChatCoroutine); } if ((this._dialogIndex >= 0) && (this._dialogIndex < this._dialogList.Count)) { DialogMetaData dialogMetaData = this._dialogList[this._dialogIndex]; this._currentDialogDataItem = new DialogDataItem(dialogMetaData); int avatarID = dialogMetaData.avatarID; MonoStoryScreen.SelectScreenSide screenSide = (MonoStoryScreen.SelectScreenSide)dialogMetaData.screenSide; this._storyScreen.RefreshAvatar3dModel(avatarID, screenSide); this._storyScreen.RefreshCurrentSpeakerWidgets(this._currentDialogDataItem); this._currentChatIndex = 0; if (this._currentDialogDataItem.plotChatNodeList.Count > 1) { this._currentChatCoroutine = Singleton <LevelManager> .Instance.levelEntity.StartCoroutine(this.WaitAllChatsDone()); } else { this.RefreshChatMsg(this._currentDialogDataItem.plotChatNodeList[this._currentChatIndex].chatContent, this._currentDialogDataItem.plotChatNodeList[this._currentChatIndex].chatDuration); this._storyScreen.StoryDialogState = MonoStoryScreen.DialogState.Displaying; this._currentChatIndex++; } Singleton <WwiseAudioManager> .Instance.Post(this._currentDialogDataItem.audio, null, null, null); } else { this.QuitPlot(); } }
public DialogDataItem(int dialogID, int avatarID, int side, string source, List <DialogMetaData.PlotChatNode> plotChatNodeList, string audio) { this.dialogID = dialogID; this.avatarID = avatarID; if (side == 0) { this.screenSide = MonoStoryScreen.SelectScreenSide.Left; } else if (side == 1) { this.screenSide = MonoStoryScreen.SelectScreenSide.Right; } else { this.screenSide = MonoStoryScreen.SelectScreenSide.None; } this.source = source; this.plotChatNodeList = plotChatNodeList; this.audio = audio; }
public DialogDataItem(DialogMetaData dialogMetaData) { this.dialogID = dialogMetaData.dialogID; this.avatarID = dialogMetaData.avatarID; if (dialogMetaData.screenSide == 0) { this.screenSide = MonoStoryScreen.SelectScreenSide.Left; } else if (dialogMetaData.screenSide == 1) { this.screenSide = MonoStoryScreen.SelectScreenSide.Right; } else { this.screenSide = MonoStoryScreen.SelectScreenSide.None; } this.source = dialogMetaData.source; this.plotChatNodeList = dialogMetaData.content; this.audio = dialogMetaData.audio; }