private void ChatBox_DialogFinished(object sender, EventArgs e) { var nextDialog = currentConversation.GetNextDialog(); if (nextDialog != null) { PlayDialog(nextDialog); } else { currentConversation.OnFinished(); currentConversation = null; var nextConversation = conversationQueue.GetNextConversation(); if (nextConversation != null) { StartConversation(nextConversation); } else { SetChatVisibility(false); } } }
private void StartConversation(IConversation conversation) { SetChatVisibility(true); currentConversation = conversation; if (conversation.WasInterrupted) { conversation.OnResumed(); } else { conversation.OnStarted(); } PlayDialog(conversation.GetNextDialog()); }