void OnSelectChoiceEvent(StratusStory.SelectChoiceEvent e)
 {
     if (ValidateStory(e) && e.choice.index == this.choiceIndex)
     {
         this.Activate();
     }
 }
示例#2
0
        /// <summary>
        /// Called upon when a particular choice has been selected
        /// </summary>
        /// <param name="choice"></param>
        public void SelectChoice(StratusStoryChoice choice)
        {
            if (logging)
            {
                StratusDebug.Log(choice.text + " was selected", this);
            }

            // Inform the current conversation of the choice
            var choiceEvent = new StratusStory.SelectChoiceEvent()
            {
                story = this.story, reader = this.reader
            };

            choiceEvent.choice = choice;
            reader.gameObject.Dispatch <StratusStory.SelectChoiceEvent>(choiceEvent);
            StratusScene.Dispatch <StratusStory.SelectChoiceEvent>(choiceEvent);

            // Now do any extra stuff
            OnChoiceSelected();
        }
 void OnSelectChoiceEvent(StratusStory.SelectChoiceEvent e)
 {
     this.SelectChoice(e.choice.index);
     this.ContinueStory();
 }