Ejemplo n.º 1
0
    public void ExecuteChoice(string choiceKey)
    {
        var fullChoiceKey = "BranchResult-" + choiceKey;
        var res           = branch.results[fullChoiceKey];

        foreach (string evTxt in res.events)
        {
            sim.AddEvent(PlayerEvent.Story(evTxt));
        }

        // TODO: Parse loot key

        if (res.thenToEventGroup)
        {
            var eventGroupKey = tpd.RemoveSubString(res.thenTo, Constants.eventGroupLabel);
            CreateEvents(eventGroupKey);
        }

        if (res.thenToPromptPull)
        {
            sim.RequireInput();
        }

        if (res.thenToEndInteraction)
        {
            sim.RemoveInteraction();
            sim.RequireInput();
        }
    }
Ejemplo n.º 2
0
    public void CreateEvents(string group)
    {
        var eventGroup = sim.currentInteraction.GetEventGroup(group);

        foreach (var atmTxt in eventGroup)
        {
            if (DetectBranch(atmTxt))
            {
                ExecuteBranch(atmTxt);
            }
            else
            {
                sim.AddEvent(PlayerEvent.Story(atmTxt));
            }
        }
    }
Ejemplo n.º 3
0
 void BeginExploring()
 {
     sim.AddEvent(PlayerEvent.Story(string.Format("{0} ventures forth...", sim.player.name)));
     sim.player.SetState(Player.State.Exploring);
     Explore();
 }