Example #1
0
 /// <summary>
 /// Attempts to set the current node to the node with the inputted name in the story.
 /// If no such node exists, this function will not change the value of the current node.
 /// </summary>
 /// <param name="nodeName"></param>
 public void TrySetCurrentNode(string nodeName)
 {
     CurrentNode = Story.FindNode(nodeName) ?? CurrentNode;
 }
Example #2
0
 public StoryRuntime(RequestContext requestContext, string storyFilePath)
 {
     RequestContext = requestContext;
     Story          = Story.Load(storyFilePath);
 }
Example #3
0
 /// <summary>
 /// Attempts to set the current node to the node with the inputted NodeIndex in the story.
 /// If no such node exists, this function will not change the value of the current node.
 /// </summary>
 /// <param name="nodeName"></param>
 public void TrySetCurrentNode(int nodeIndex)
 {
     CurrentNode = Story.FindNode(nodeIndex) ?? CurrentNode;
 }
Example #4
0
 public StoryRuntime(RequestContext requestContext, Story story)
 {
     RequestContext = requestContext;
     Story          = story;
 }