void OnStoryStartedEvent(Story.StartedEvent e) { if (ValidateStory(e)) { this.Activate(); } }
//------------------------------------------------------------------------------------------/ // Methods: Parsing //------------------------------------------------------------------------------------------/ /// <summary> /// Starts the current dialog. /// </summary> void StartStory(bool resume = false) { // If a knot has been selected... if (story.startingKnot.Length > 0) { this.JumpToKnot(story.startingKnot); } // Inform the space that dialog has started var startedEvent = new Story.StartedEvent() { reader = this, story = story }; // Dispatch to this gameobject and the scene this.gameObject.Dispatch <Story.StartedEvent>(startedEvent); Scene.Dispatch <Story.StartedEvent>(startedEvent); currentlyReading = true; // Update the first line of dialog this.ContinueStory(!resume); story.started = true; if (debug) { StratusDebug.Log($"The story {story.name} has started at the knot '{latestKnot}'"); } }
//------------------------------------------------------------------------------------------/ // Events //------------------------------------------------------------------------------------------/ /// <summary> /// Received when a story has started /// </summary> /// <param name="e"></param> void OnStoryStartedEvent(Story.StartedEvent e) { reader = e.reader; story = e.story; OnStoryStarted(); }
/// <summary> /// Received when a story has been started by the reader /// </summary> /// <param name="e"></param> void OnStoryStartedEvent(Story.StartedEvent e) { }