void OnStoryEndedEvent(Story.EndedEvent e) { if (ValidateStory(e)) { this.Activate(); } }
/// <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(); } }
/// <summary> /// Received when a story has ended /// </summary> /// <param name="e"></param> void OnStoryEndedEvent(Story.EndedEvent e) { OnStoryEnded(); }
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); }