示例#1
0
 void OnStoryEndedEvent(Story.EndedEvent e)
 {
     if (ValidateStory(e))
     {
         this.Activate();
     }
 }
示例#2
0
                /// <summary>
                /// Ends the dialog.
                /// </summary>
                void EndStory()
                {
                    if (debug)
                    {
                        Trace.Script($"The story {story.fileName} has ended at the knot '{story.latestKnot}'");
                    }

                    // Dispatch the ended event
                    var storyEnded = new Story.EndedEvent()
                    {
                        reader = this, story = this.story
                    };

                    this.gameObject.Dispatch <Story.EndedEvent>(storyEnded);
                    Scene.Dispatch <Story.EndedEvent>(storyEnded);

                    // Save the story
                    Save();

                    // We are no longer reading a story
                    currentlyReading = false;

                    // If we are queuing stories and there's one queueud up, let's start it
                    if (queueStories && storyQueue.Count > 0)
                    {
                        QueueNextStory();
                    }
                }
示例#3
0
 /// <summary>
 /// Received when a story has ended
 /// </summary>
 /// <param name="e"></param>
 void OnStoryEndedEvent(Story.EndedEvent e)
 {
     OnStoryEnded();
 }
示例#4
0
 void OnStoryEndedEvent(Story.EndedEvent e)
 {
     //var removeEvent = new Story.RemoveVariableObserverEvent();
     //removeEvent.variableObserver = OnValueChanged;
     //reader.gameObject.Dispatch<Story.RemoveVariableObserverEvent>(removeEvent);
 }
 /// <summary>
 /// Received when the StoryReader is done going through the story.
 /// This will return control back to the main system
 /// </summary>
 /// <param name="e"></param>
 void OnStoryEndedEvent(Story.EndedEvent e)
 {
     Space.DispatchEvent(Events.FinishedStory);
 }