/// <summary> /// Initializes a new ConversationController and starts the conversation in the model. /// Also sends OnConversationStart messages to the participants. /// </summary> /// <param name='model'> /// Data model of the conversation. /// </param> /// <param name='view'> /// View to use to provide a user interface for the conversation. /// </param> /// <param name='endConversationHandler'> /// Handler to call to inform when the conversation is done. /// </param> public ConversationController(ConversationModel model, ConversationView view, bool alwaysForceResponseMenu, Action endConversationHandler) { IsActive = true; this.model = model; this.view = view; this.alwaysForceResponseMenu = alwaysForceResponseMenu; this.endConversationHandler = endConversationHandler; model.InformParticipants("OnConversationStart"); view.FinishedSubtitleHandler += OnFinishedSubtitle; view.SelectedResponseHandler += OnSelectedResponse; GotoState(model.FirstState); }
/// <summary> /// Initializes a new ConversationController and starts the conversation in the model. /// Also sends OnConversationStart messages to the participants. /// </summary> /// <param name='model'> /// Data model of the conversation. /// </param> /// <param name='view'> /// View to use to provide a user interface for the conversation. /// </param> /// <param name='endConversationHandler'> /// Handler to call to inform when the conversation is done. /// </param> public ConversationController(ConversationModel model, ConversationView view, bool alwaysForceResponseMenu, EndConversationDelegate endConversationHandler) { isActive = true; this.m_model = model; this.m_view = view; this.m_endConversationHandler = endConversationHandler; model.InformParticipants(DialogueSystemMessages.OnConversationStart); view.FinishedSubtitleHandler += OnFinishedSubtitle; view.SelectedResponseHandler += OnSelectedResponse; m_currentConversationID = model.GetConversationID(model.firstState); SetConversationOverride(model.firstState); GotoState(model.firstState); }