예제 #1
0
        /// <summary>
        /// Handles the finished subtitle event. If the current conversation state has an NPC
        /// response, the conversation proceeds to that response. Otherwise, if the current
        /// state has PC responses, then the response menu is shown (or if it has a single
        /// auto-response, the conversation proceeds directly to that response). If there are no
        /// responses, the conversation ends.
        /// </summary>
        /// <param name='sender'>
        /// Sender.
        /// </param>
        /// <param name='e'>
        /// Event args.
        /// </param>
        public void OnFinishedSubtitle(object sender, EventArgs e)
        {
            var randomize = randomizeNextEntry;

            randomizeNextEntry = false;
            if (m_state.hasNPCResponse)
            {
                GotoState(m_model.GetState(randomize ? m_state.GetRandomNPCEntry() : m_state.firstNPCResponse.destinationEntry));
            }
            else if (m_state.hasPCResponses)
            {
                bool isPCResponseMenuNext, isPCAutoResponseNext;
                AnalyzePCResponses(m_state, out isPCResponseMenuNext, out isPCAutoResponseNext);
                if (isPCAutoResponseNext)
                {
                    GotoState(m_model.GetState(m_state.pcAutoResponse.destinationEntry));
                }
                else
                {
                    m_view.StartResponses(m_state.subtitle, m_state.pcResponses);
                }
            }
            else
            {
                Close();
            }
        }
 /// <summary>
 /// Handles the finished subtitle event. If the current conversation state has an NPC
 /// response, the conversation proceeds to that response. Otherwise, if the current
 /// state has PC responses, then the response menu is shown (or if it has a single
 /// auto-response, the conversation proceeds directly to that response). If there are no
 /// responses, the conversation ends.
 /// </summary>
 /// <param name='sender'>
 /// Sender.
 /// </param>
 /// <param name='e'>
 /// Event args.
 /// </param>
 private void OnFinishedSubtitle(object sender, EventArgs e)
 {
     if (state.HasNPCResponse)
     {
         GotoState(model.GetState(state.FirstNPCResponse.destinationEntry));
     }
     else if (state.HasPCResponses)
     {
         if (state.HasPCAutoResponse && (!alwaysForceResponseMenu || state.pcResponses[0].destinationEntry.isGroup))
         {
             GotoState(model.GetState(state.PCAutoResponse.destinationEntry));
         }
         else
         {
             view.StartResponses(state.subtitle, state.pcResponses);
         }
     }
     else
     {
         Close();
     }
 }
 /// <summary>
 /// Handles the finished subtitle event. If the current conversation state has an NPC
 /// response, the conversation proceeds to that response. Otherwise, if the current
 /// state has PC responses, then the response menu is shown (or if it has a single
 /// auto-response, the conversation proceeds directly to that response). If there are no
 /// responses, the conversation ends.
 /// </summary>
 /// <param name='sender'>
 /// Sender.
 /// </param>
 /// <param name='e'>
 /// Event args.
 /// </param>
 private void OnFinishedSubtitle(object sender, EventArgs e)
 {
     if (state.hasNPCResponse)
     {
         GotoState(m_model.GetState(state.firstNPCResponse.destinationEntry));
     }
     else if (state.hasPCResponses)
     {
         bool isPCResponseMenuNext, isPCAutoResponseNext;
         AnalyzePCResponses(state, out isPCResponseMenuNext, out isPCAutoResponseNext);
         if (isPCAutoResponseNext)
         {
             GotoState(m_model.GetState(state.pcAutoResponse.destinationEntry));
         }
         else
         {
             m_view.StartResponses(state.subtitle, state.pcResponses);
         }
     }
     else
     {
         Close();
     }
 }