void OnStoryEndedEvent(StratusStory.EndedEvent e)
 {
     if (ValidateStory(e))
     {
         this.Activate();
     }
 }
        /// <summary>
        /// Ends the dialog.
        /// </summary>
        private void EndStory()
        {
            if (debug)
            {
                this.Log($"The story {story.name} has ended at the knot '{story.latestKnot}'");
            }

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

            this.gameObject.Dispatch <StratusStory.EndedEvent>(storyEnded);
            StratusScene.Dispatch <StratusStory.EndedEvent>(storyEnded);
            onStoryEnded?.Invoke(story);

            // Save the story
            if (saveOnEnd)
            {
                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();
            }
        }
 void OnStoryEndedEvent(StratusStory.EndedEvent e)
 {
     //var removeEvent = new Story.RemoveVariableObserverEvent();
     //removeEvent.variableObserver = OnValueChanged;
     //reader.gameObject.Dispatch<Story.RemoveVariableObserverEvent>(removeEvent);
 }
Exemple #4
0
 /// <summary>
 /// Received when a story has ended
 /// </summary>
 /// <param name="e"></param>
 void OnStoryEndedEvent(StratusStory.EndedEvent e)
 {
     OnStoryEnded();
 }