コード例 #1
0
        // Token: 0x06001405 RID: 5125 RVA: 0x00020834 File Offset: 0x0001F834
        protected override WorkflowElement CreateBody()
        {
            StateGraph            stateGraph = new StateGraph(string.Format("OpponentTreasureHunt: {0}", base.Entrant.Opponent.OpponentName));
            State                 state      = new State("initial");
            State                 state2     = new State("hunting");
            State                 state3     = new State("collected");
            State                 state4     = new State("huntover");
            State                 item       = new State("done");
            PrepareScoringMethod  item2      = new PrepareScoringMethod(base.Event, base.Entrant);
            SendNews              item3      = new SendNews(base.Event, base.Entrant);
            EnableHud             item4      = new EnableHud(base.Event, EnableHud.HudToggle.Enable);
            OnUpdateTick          activity   = new OnUpdateTick(base.Event, base.Entrant);
            DisableTriggerOnEnter activity2  = new DisableTriggerOnEnter(base.Event, base.Entrant, Ports.Gameplay);
            DisplayFlasher        item5      = new DisplayFlasher(base.Event, base.Entrant, this.allCoinsCollectedFlasher);
            RemoveFlasher         item6      = new RemoveFlasher(base.Event, base.Entrant, this.allCoinsCollectedFlasher);
            EnableHud             item7      = new EnableHud(base.Event, EnableHud.HudToggle.Dispose);
            CleanupScoringMethod  item8      = new CleanupScoringMethod(base.Event, base.Entrant);
            EntrantFinished       activity3  = new EntrantFinished(base.Event, base.Entrant, 8202);
            PostEventScreen       activity4  = new PostEventScreen(base.Event, base.Entrant, Ports.Gameplay);
            RefreshPersona        item9      = new RefreshPersona(base.Event, base.Entrant);
            VisualEffect          item10     = new VisualEffect(EffectType.TREASURE_HUNT_ICON_PICKUP);

            GameCore.Activities.Components.CloseOnReceive <OnHuntCompleted> activity5 = new GameCore.Activities.Components.CloseOnReceive <OnHuntCompleted>(Ports.Gameplay);
            GameCore.Activities.Components.CloseOnReceive <OnHuntContinued> activity6 = new GameCore.Activities.Components.CloseOnReceive <OnHuntContinued>(Ports.Gameplay);
            CoinCollected          item11 = new CoinCollected(base.Event, base.Entrant);
            OverrideVehicleControl item12 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Coast);
            OverrideVehicleControl item13 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Release);
            ChangeBlackBoard       item14 = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_AI, 331198907u);
            DisconnectFromRoaming  item15 = new DisconnectFromRoaming();

            state.EnterActivity.Activities.Add(item4);
            state.EnterActivity.Activities.Add(item2);
            state.EnterActivity.Activities.Add(item3);
            state.Transitions.Add(new Transition("hunting"));
            state2.Transitions.Add(new Transition(activity));
            state2.Transitions.Add(new Transition("collected", activity2));
            state2.Transitions.Add(new Transition("done", activity3));
            state3.EnterActivity.Activities.Add(item4);
            state3.EnterActivity.Activities.Add(item10);
            state3.Transitions.Add(new Transition("huntover", activity5));
            state3.Transitions.Add(new Transition("hunting", activity6));
            state3.ExitActivity.Activities.Add(item11);
            state4.EnterActivity.Activities.Add(item15);
            state4.EnterActivity.Activities.Add(item12);
            state4.EnterActivity.Activities.Add(item14);
            state4.EnterActivity.Activities.Add(item5);
            state4.EnterActivity.Activities.Add(new Timer(new InArgument <float>(() => 3f)));
            state4.EnterActivity.Activities.Add(item6);
            state4.Transitions.Add(new Transition("done", activity4));
            state4.ExitActivity.Activities.Add(item9);
            state4.ExitActivity.Activities.Add(item7);
            state4.ExitActivity.Activities.Add(item8);
            state4.ExitActivity.Activities.Add(item13);
            stateGraph.InitialState = "initial";
            stateGraph.DoneState    = "done";
            stateGraph.States.Add(state);
            stateGraph.States.Add(state2);
            stateGraph.States.Add(state3);
            stateGraph.States.Add(state4);
            stateGraph.States.Add(item);
            return(stateGraph);
        }
コード例 #2
0
        // Token: 0x06001403 RID: 5123 RVA: 0x0001FB4C File Offset: 0x0001EB4C
        protected override WorkflowElement CreateBody()
        {
            StateGraph stateGraph        = new StateGraph(string.Format("EntrantTeamEscape: {0}", base.Entrant.Opponent.OpponentName));
            State      state             = new State("initial");
            State      state2            = new State("countdown");
            State      state3            = new State("running");
            State      state4            = new State("crossedfinish");
            State      state5            = new State("raceover");
            State      state6            = new State("post");
            State      state7            = new State("aborted");
            State      state8            = new State("done");
            AssignPursuitEscalation item = new AssignPursuitEscalation(base.InstancedEvent.EventDef.PursuitEscalation().GetKey());

            state.EnterActivity.Activities.Add(item);
            state.Transitions.Add(new Transition("countdown"));
            LockEntrant          item2    = new LockEntrant(base.InstancedEvent, base.Entrant, true);
            PrepareScoringMethod item3    = new PrepareScoringMethod(base.InstancedEvent, base.Entrant);
            EntrantLoaded        item4    = new EntrantLoaded(base.InstancedEvent, base.Entrant, "Entrants.Loading");
            EnableKeyboard       item5    = new EnableKeyboard(true);
            EnableLoadingScreen  item6    = new EnableLoadingScreen(false);
            FlushTraffic         item7    = new FlushTraffic();
            LoadBlackBoards      item8    = new LoadBlackBoards(base.Event, BlackBoardFlag.kBlackBoardFlag_Running);
            Countdown            activity = new Countdown(base.InstancedEvent, base.Entrant);
            TryPerfectLaunch     item9    = new TryPerfectLaunch(base.InstancedEvent, base.Entrant);

            GameCore.Workflow.Activities.WaitAll item10 = new GameCore.Workflow.Activities.WaitAll("Entrants.Countdown");
            SetSignal   item11 = new SetSignal("Entrants.Countdown");
            UnSetSignal item12 = new UnSetSignal("Entrants.Countdown");
            Launch      item13 = new Launch(base.InstancedEvent, base.Entrant);
            LockEntrant item14 = new LockEntrant(base.InstancedEvent, base.Entrant, false);

            if (base.Entrant.Opponent is LocalHumanOpponent)
            {
                state2.EnterActivity.Activities.Add(item2);
                state2.EnterActivity.Activities.Add(item3);
                state2.EnterActivity.Activities.Add(item4);
                state2.EnterActivity.Activities.Add(item5);
                state2.EnterActivity.Activities.Add(item7);
                state2.EnterActivity.Activities.Add(item6);
                state2.EnterActivity.Activities.Add(item8);
                state2.Transitions.Add(new Transition("running", activity));
                state2.ExitActivity.Activities.Add(item9);
                state2.ExitActivity.Activities.Add(item11);
                state2.ExitActivity.Activities.Add(item10);
                state2.ExitActivity.Activities.Add(item12);
                state2.ExitActivity.Activities.Add(item13);
                state2.ExitActivity.Activities.Add(item14);
            }
            else
            {
                state2.EnterActivity.Activities.Add(item2);
                state2.EnterActivity.Activities.Add(item3);
                state2.EnterActivity.Activities.Add(item4);
                state2.EnterActivity.Activities.Add(item5);
                state2.EnterActivity.Activities.Add(item6);
                state2.Transitions.Add(new Transition("running", activity));
                state2.ExitActivity.Activities.Add(item11);
                state2.ExitActivity.Activities.Add(item10);
                state2.ExitActivity.Activities.Add(item12);
                state2.ExitActivity.Activities.Add(item13);
                state2.ExitActivity.Activities.Add(item14);
            }
            RoutingTriggered activity2 = new RoutingTriggered(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            Sequence         sequence  = new Sequence();

            GameCore.Workflow.Activities.WaitAll item15 = new GameCore.Workflow.Activities.WaitAll("TeamEscape.AllBusted");
            SetSignal     item16 = new SetSignal("TeamEscape.AllBusted");
            FinishEntrant item17 = new FinishEntrant(base.InstancedEvent, base.Entrant, FinishReason.Busted);

            sequence.Activities.Add(item15);
            sequence.Activities.Add(item17);
            OnUpdateTick           activity3 = new OnUpdateTick(base.InstancedEvent, base.Entrant);
            EntrantInterupt        activity4 = new EntrantInterupt(base.InstancedEvent, base.Entrant, Ports.Gameplay, FinishReason.TimedOut);
            EntrantExtrapolate     activity5 = new EntrantExtrapolate(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            EntrantDisconnected    activity6 = new EntrantDisconnected(base.InstancedEvent, base.Entrant);
            EntrantFinishedFlasher activity7 = new EntrantFinishedFlasher(base.InstancedEvent, base.Entrant);
            WrongWayNotification   activity8 = new WrongWayNotification(base.InstancedEvent, base.Entrant);
            NavigateToGPSUpdater   activity9 = new NavigateToGPSUpdater(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            Sequence      sequence2          = new Sequence();
            Timer         item18             = new Timer(new InArgument <float>(new InArgumentHandler <float>(base.Event.EventDef.TimeLimit)));
            FinishEntrant item19             = new FinishEntrant(base.InstancedEvent, base.Entrant, FinishReason.TimeLimitExpired);

            sequence2.Activities.Add(item18);
            sequence2.Activities.Add(item19);
            EntrantPursuitSubgraph activity10 = new EntrantPursuitSubgraph(base.InstancedEvent, base.Entrant);
            Conclude              item20      = new Conclude(base.InstancedEvent, base.Entrant);
            SortEntrants          item21      = new SortEntrants(base.InstancedEvent);
            ReportEntrantFinished item22      = new ReportEntrantFinished(base.InstancedEvent, base.Entrant);
            KillPursuit           item23      = new KillPursuit();
            Sequence              sequence3   = new Sequence();

            GameCore.Activities.Components.CloseOnReceive <OnTimingOut> item24 = new GameCore.Activities.Components.CloseOnReceive <OnTimingOut>(Ports.Gameplay);
            ChangeBlackBoard item25 = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_Audio, 1482065563u);
            DisplayFlasher   item26 = new DisplayFlasher(base.InstancedEvent, base.Entrant, new FormattedFlasher(758313117u, (int)base.Event.EventDef.TimeLimitWarning()));

            sequence3.Activities.Add(item24);
            sequence3.Activities.Add(item25);
            sequence3.Activities.Add(item26);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitEngaged>  activity11 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitEngaged>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitCooldown> activity12 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitCooldown>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitEvaded>   activity13 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitEvaded>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitBusted>   activity14 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnPursuitBusted>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerEnter>    activity15 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerEnter>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerExit>     activity16 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerExit>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            SetOpponentStatus   item27 = new SetOpponentStatus(base.InstancedEvent, base.Entrant, OpponentStatus.kOpponent_NotSpectatable, true);
            ActivateSuddenDeath item28 = new ActivateSuddenDeath(base.InstancedEvent);

            if (base.Entrant.Opponent is LocalHumanOpponent)
            {
                state3.Transitions.Add(new Transition(activity11));
                state3.Transitions.Add(new Transition(activity12));
                state3.Transitions.Add(new Transition(activity13));
                state3.Transitions.Add(new Transition(activity14));
                state3.Transitions.Add(new Transition(activity15));
                state3.Transitions.Add(new Transition(activity16));
                state3.Transitions.Add(new Transition(activity2));
                state3.Transitions.Add(new Transition(activity3));
                state3.Transitions.Add(new Transition(activity4));
                state3.Transitions.Add(new Transition(activity5));
                state3.Transitions.Add(new Transition(activity6));
                state3.Transitions.Add(new Transition(sequence));
                state3.Transitions.Add(new Transition(sequence2));
                state3.Transitions.Add(new Transition(sequence3));
                state3.Transitions.Add(new Transition(activity8));
                state3.Transitions.Add(new Transition(activity9));
                state3.Transitions.Add(new Transition("raceover", activity10));
                state3.ExitActivity.Activities.Add(item27);
                state3.ExitActivity.Activities.Add(item16);
                state3.ExitActivity.Activities.Add(item20);
                state3.ExitActivity.Activities.Add(item21);
                state3.ExitActivity.Activities.Add(item22);
                state3.ExitActivity.Activities.Add(item23);
            }
            else
            {
                state3.EnterActivity.Activities.Add(item14);
                state3.Transitions.Add(new Transition(activity2));
                state3.Transitions.Add(new Transition(activity3));
                state3.Transitions.Add(new Transition(activity4));
                state3.Transitions.Add(new Transition(activity5));
                state3.Transitions.Add(new Transition(activity6));
                state3.Transitions.Add(new Transition(activity7));
                state3.Transitions.Add(new Transition(sequence));
                state3.Transitions.Add(new Transition(sequence2));
                state3.Transitions.Add(new Transition("raceover", activity10));
                state3.ExitActivity.Activities.Add(item27);
                state3.ExitActivity.Activities.Add(item16);
                state3.ExitActivity.Activities.Add(item20);
                state3.ExitActivity.Activities.Add(item21);
                state3.ExitActivity.Activities.Add(item22);
            }
            EntrantFinished        activity17 = new EntrantFinished(base.InstancedEvent, base.Entrant, -8209);
            EntrantFinished        activity18 = new EntrantFinished(base.InstancedEvent, base.Entrant, 8202);
            EntrantFinished        activity19 = new EntrantFinished(base.InstancedEvent, base.Entrant, 22);
            OverrideVehicleControl item29     = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Coast);
            EnableReplication      item30     = new EnableReplication(base.Entrant.Opponent.Vehicle, false);

            state5.EnterActivity.Activities.Add(item29);
            state5.EnterActivity.Activities.Add(item30);
            state5.Transitions.Add(new Transition("crossedfinish", activity19));
            state5.Transitions.Add(new Transition("post", activity17));
            state5.Transitions.Add(new Transition("aborted", activity18));
            state4.EnterActivity.Activities.Add(item28);
            state4.Transitions.Add(new Transition("post"));
            if (base.Entrant.Opponent is RemoteHumanOpponent)
            {
                Abort item31 = new Abort(base.InstancedEvent, base.Entrant);
                state7.EnterActivity.Activities.Add(item31);
            }
            state7.Transitions.Add(new Transition("done"));
            PostEventScreen    activity20 = new PostEventScreen(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            ChangeBlackBoard   item32     = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_Audio, 4088298651u);
            EntrantBustedAudio item33     = new EntrantBustedAudio(base.InstancedEvent, base.Entrant);
            AbortEvent         item34     = new AbortEvent(base.InstancedEvent);
            FlushCops          item35     = new FlushCops();
            ChangeBlackBoard   item36     = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_AI, 331198907u);
            LobbyTick          activity21 = new LobbyTick(0.25f);

            if (base.Entrant.Opponent is LocalHumanOpponent)
            {
                state6.EnterActivity.Activities.Add(item32);
                state6.EnterActivity.Activities.Add(item36);
                state6.EnterActivity.Activities.Add(item35);
                state6.EnterActivity.Activities.Add(item7);
                state6.Transitions.Add(new Transition(activity21));
                state6.Transitions.Add(new Transition(activity6));
                state6.Transitions.Add(new Transition("done", activity20));
                state6.EnterActivity.Activities.Add(item33);
                state6.ExitActivity.Activities.Add(item34);
            }
            else
            {
                state6.Transitions.Add(new Transition("done"));
            }
            CleanupScoringMethod   item37 = new CleanupScoringMethod(base.InstancedEvent, base.Entrant);
            OverrideVehicleControl item38 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Release);
            RefreshPersona         item39 = new RefreshPersona(base.Event, base.Entrant);

            state8.EnterActivity.Activities.Add(item38);
            state8.EnterActivity.Activities.Add(item37);
            state8.EnterActivity.Activities.Add(item39);
            stateGraph.InitialState = "initial";
            stateGraph.DoneState    = "done";
            stateGraph.States.Add(state);
            stateGraph.States.Add(state2);
            stateGraph.States.Add(state3);
            stateGraph.States.Add(state5);
            stateGraph.States.Add(state4);
            stateGraph.States.Add(state6);
            stateGraph.States.Add(state7);
            stateGraph.States.Add(state8);
            return(stateGraph);
        }