public void HandleSubgraphFinish()
        {
            _subgraphHandler  = null;
            _handlingSubgraph = false;

            AdvanceStory(_afterSubgraphElement);
        }
        /// <summary>
        /// Starts a provided StoryGraph
        /// </summary>
        /// <param name="graph"></param>
        /// <returns>True if the Story is started directly. False if the provided Graph is Queued.</returns>
        public bool StartStory(StoryGraph graph)
        {
            if (_currentStoryManager == null)
            {
                Canvas.Show();
                _currentStoryManager = new UVNFStoryManager(graph, this, Canvas, FinishStory);
                return(true);
            }

            QueueStory(graph);
            return(false);
        }
        public void CreateSubStory(StoryGraph graph, UVNFManager manager, UVNFCanvas canvas)
        {
            if (_subgraphHandler == null)
            {
                _afterSubgraphElement = _currentElement.Next;

                _subgraphHandler  = new UVNFStoryManager(graph, manager, canvas, HandleSubgraphFinish);
                _handlingSubgraph = true;
            }
            else
            {
                _subgraphHandler.CreateSubStory(graph, manager, canvas);
            }
        }
 private void FinishStory()
 {
     _currentStoryManager = null;
     //Story still left in the Queue
     if (_graphQueue.Count > 0)
     {
         StartStory(_graphQueue.Dequeue());
     }
     //Story if finished
     else
     {
         Canvas.Hide();
         CharacterManager.Hide();
     }
 }