public void DialogueSpeaked(Dialogue speakedDialogue)
        {
            IDialogueDetector detector = this.currentState as IDialogueDetector;

            if (detector != null)
            {
                detector.OnDialogueSpeaked(speakedDialogue);
            }
        }
示例#2
0
        /// <summary>
        /// Companion speaked a dialogue
        /// </summary>
        /// <param name="speakedDialogue"></param>
        public void DialogueSpeaked(Dialogue speakedDialogue)
        {
            // Convert state to dialogue detector (if state implements it)
            IDialogueDetector detector = this.currentState as IDialogueDetector;

            if (detector != null)
            {
                detector.OnDialogueSpeaked(speakedDialogue); // Handle this dialogue
            }
        }