void OnSelectChoiceEvent(Story.SelectChoiceEvent e) { if (ValidateStory(e) && e.choice.index == this.choiceIndex) { this.Activate(); } }
/// <summary> /// Called upon when a particular choice has been selected /// </summary> /// <param name="choice"></param> public void SelectChoice(Choice choice) { if (logging) { Trace.Script(choice.text + " was selected", this); } // Inform the current conversation of the choice var choiceEvent = new Story.SelectChoiceEvent() { story = this.story, reader = this.reader }; choiceEvent.choice = choice; reader.gameObject.Dispatch <Story.SelectChoiceEvent>(choiceEvent); Scene.Dispatch <Story.SelectChoiceEvent>(choiceEvent); // Now do any extra stuff OnChoiceSelected(); }
void OnSelectChoiceEvent(Story.SelectChoiceEvent e) { this.SelectChoice(e.choice); this.ContinueStory(); }