コード例 #1
0
 void OnSelectChoiceEvent(Story.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(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();
                }
コード例 #3
0
 void OnSelectChoiceEvent(Story.SelectChoiceEvent e)
 {
     this.SelectChoice(e.choice);
     this.ContinueStory();
 }