示例#1
0
        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);
                }
            }
        }
示例#2
0
        private void StartConversation(IConversation conversation)
        {
            SetChatVisibility(true);
            currentConversation = conversation;

            if (conversation.WasInterrupted)
            {
                conversation.OnResumed();
            }
            else
            {
                conversation.OnStarted();
            }

            PlayDialog(conversation.GetNextDialog());
        }