public void AdvanceStory(StoryElement newStoryPoint, bool continueToRun = false) { if (_handlingSubgraph) { _subgraphHandler.AdvanceStory(false); } else if (newStoryPoint != null) { if (!continueToRun) { _currentTask.Stop(); } _currentElement = newStoryPoint; _currentTask = TaskManager.CreateTask(_currentElement.Execute(_manager, _canvas)); _currentTask.Finished += AdvanceStory; _currentTask.Start(); } else { _afterSubgraphHandler?.Invoke(); } }
public void Flush() { task.Stop(); task.Finished -= TaskFinished; ObjPool <Task> .Release(this); }
public void Stop() { task.Stop(); }