internal void StartFunctionEvaluationFromGame(Container funcContainer, params object[] arguments) { callStack.Push(PushPopType.FunctionEvaluationFromGame, evaluationStack.Count); callStack.currentElement.currentPointer = Pointer.StartOf(funcContainer); PassArgumentsToEvaluationStack(arguments); }
public CallStack(Container rootContentContainer) { _threads = new List <Thread> (); _threads.Add(new Thread()); _threads [0].callstack.Add(new Element(PushPopType.Tunnel, Pointer.StartOf(rootContentContainer))); }
// Unfortunately it's not possible to implement jsonToken since // the setter needs to take a Story as a context in order to // look up objects from paths for currentContainer within elements. public void SetJsonToken(Dictionary <string, object> jObject, Story storyContext) { _threads.Clear(); var jThreads = (List <object>)jObject ["threads"]; foreach (object jThreadTok in jThreads) { var jThreadObj = (Dictionary <string, object>)jThreadTok; var thread = new Thread(jThreadObj, storyContext); _threads.Add(thread); } _threadCounter = (int)jObject ["threadCounter"]; _startOfRoot = Pointer.StartOf(storyContext.rootContentContainer); }
internal void GoToStart() { callStack.currentElement.currentPointer = Pointer.StartOf(story.mainContentContainer); }
public CallStack(Story storyContext) { _startOfRoot = Pointer.StartOf(storyContext.rootContentContainer); Reset(); }