示例#1
0
文件: StoryState.cs 项目: wldmr/ink
        internal void StartFunctionEvaluationFromGame(Container funcContainer, params object[] arguments)
        {
            callStack.Push(PushPopType.FunctionEvaluationFromGame, evaluationStack.Count);
            callStack.currentElement.currentPointer = Pointer.StartOf(funcContainer);

            PassArgumentsToEvaluationStack(arguments);
        }
示例#2
0
        public CallStack(Container rootContentContainer)
        {
            _threads = new List <Thread> ();
            _threads.Add(new Thread());

            _threads [0].callstack.Add(new Element(PushPopType.Tunnel, Pointer.StartOf(rootContentContainer)));
        }
示例#3
0
        // 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);
        }
示例#4
0
文件: StoryState.cs 项目: wldmr/ink
 internal void GoToStart()
 {
     callStack.currentElement.currentPointer = Pointer.StartOf(story.mainContentContainer);
 }
示例#5
0
 public CallStack(Story storyContext)
 {
     _startOfRoot = Pointer.StartOf(storyContext.rootContentContainer);
     Reset();
 }