Example #1
0
 /// <summary>
 /// Goes to a conversation state. If the state is <c>null</c>, the conversation ends.
 /// </summary>
 /// <param name='state'>
 /// State.
 /// </param>
 public void GotoState(ConversationState state)
 {
     this.m_state = state;
     DialogueManager.instance.currentConversationState = state;
     if (state != null)
     {
         // Check for change of conversation:
         var newConversationID = m_model.GetConversationID(state);
         if (newConversationID != m_currentConversationID)
         {
             m_currentConversationID = newConversationID;
             m_model.InformParticipants(DialogueSystemMessages.OnLinkedConversationStart, true);
             m_model.UpdateParticipantsOnLinkedConversation(newConversationID);
             m_view.SetPCPortrait(m_model.GetPCSprite(), m_model.GetPCName());
             SetConversationOverride(state);
         }
         // Use view to show current state:
         if (state.isGroup)
         {
             m_view.ShowLastNPCSubtitle();
         }
         else
         {
             bool isPCResponseMenuNext, isPCAutoResponseNext;
             AnalyzePCResponses(state, out isPCResponseMenuNext, out isPCAutoResponseNext);
             m_view.StartSubtitle(state.subtitle, isPCResponseMenuNext, isPCAutoResponseNext);
         }
     }
     else
     {
         Close();
     }
 }
 /// <summary>
 /// Goes to a conversation state. If the state is <c>null</c>, the conversation ends.
 /// </summary>
 /// <param name='state'>
 /// State.
 /// </param>
 private void GotoState(ConversationState state)
 {
     this.state = state;
     if (state != null)
     {
         if (state.IsGroup)
         {
             view.ShowLastNPCSubtitle();
         }
         else
         {
             var isPCAutoResponseNext = state.HasPCAutoResponse;
             var isPCResponseMenuNext = !isPCAutoResponseNext && state.HasPCResponses && !state.HasNPCResponse;
             view.StartSubtitle(state.subtitle, isPCResponseMenuNext, isPCAutoResponseNext);
         }
     }
     else
     {
         Close();
     }
     DialogueManager.Instance.CurrentConversationState = state;
 }