コード例 #1
0
        public static void TolstoyRomantic(Entity main, Entity other, out ActionSequence mainActionSequence, out ActionSequence otherActionSequence)
        {
            mainActionSequence  = new ActionSequence("TolstoyRomanticOneMain");
            otherActionSequence = new ActionSequence("TolstoyRomanticOneOther");

            var ordering = CommonActions.GoToPaypointAndOrderDrink(main, DrinkRecipes.GetRandomDrinkRecipe());

            mainActionSequence.Add(ordering);

            var talkToPlayer = CommonActions.TalkToPlayer(new TolstoyOneDialogue());

            mainActionSequence.Add(talkToPlayer);

            otherActionSequence.Add(CommonActions.Wander());

            var sync = new SyncedAction(main, other);

            mainActionSequence.Add(sync);
            otherActionSequence.Add(sync);

            mainActionSequence.Add(new SetTargetEntityAction(other));
            mainActionSequence.Add(new GoToMovingEntityAction());

            otherActionSequence.Add(new SetTargetEntityAction(main));
            otherActionSequence.Add(new GoToMovingEntityAction());

            var sync2 = new SyncedAction(main, other);

            mainActionSequence.Add(sync2);
            otherActionSequence.Add(sync2);

            var branchingDialogue = new DialogueBranchAction(
                new Dictionary <DialogueOutcome, Action>
            {
                { DialogueOutcome.Romantic, () => {
                      ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Happy));
                  } },
                { DialogueOutcome.Mean, () => {
                      ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Angry));
                  } },
                { DialogueOutcome.Nice, () => {
                      ActionManagerSystem.Instance.AddActionToFrontOfQueueForEntity(main, new UpdateMoodAction(Mood.Happy));
                  } }
            });

            mainActionSequence.Add(branchingDialogue);

            otherActionSequence.Add(new PauseAction(3));
            otherActionSequence.Add(new UpdateMoodAction(Mood.Angry));

            var sync3 = new SyncedAction(main, other);

            mainActionSequence.Add(sync3);
            otherActionSequence.Add(sync3);

            mainActionSequence.Add(CommonActions.TalkToPlayer(new TolstoyTwoDialogue()));

            mainActionSequence.Add(new LeaveBarAction());
            otherActionSequence.Add(new LeaveBarAction());
        }
コード例 #2
0
        public static void AddSyncEntityAction(Entity a, Entity b, ActionSequence aSequence, ActionSequence bSequence)
        {
            var sync = new SyncedAction(a, b);

            aSequence.Add(sync);
            bSequence.Add(sync);
        }