Exemplo n.º 1
0
    public SealedStory(TextAsset Json, VariablesState variableState)
    {
        story = new Story(Json.text);

        foreach (string s in variableState)
        {
            story.variablesState[s] = variableState[s];
        }
    }
Exemplo n.º 2
0
        internal StoryState(Story story)
        {
            this.story = story;

            _outputStream = new List<Runtime.Object> ();

            evaluationStack = new List<Runtime.Object> ();

            callStack = new CallStack (story.rootContentContainer);
            variablesState = new VariablesState (callStack);

            visitCounts = new Dictionary<string, int> ();
            turnIndices = new Dictionary<string, int> ();
            currentTurnIndex = -1;

            // Seed the shuffle random numbers
            int timeSeed = DateTime.Now.Millisecond;
            storySeed = (new Random (timeSeed)).Next () % 100;

            currentChoices = new List<Choice> ();

            GoToStart();
        }
Exemplo n.º 3
0
 internal GlueVariablesState(VariablesState inVariablesState)
 {
     _variablesState = inVariablesState;
 }