Пример #1
0
        // Token: 0x060013F8 RID: 5112 RVA: 0x0001D2B4 File Offset: 0x0001C2B4
        protected override WorkflowElement CreateBody()
        {
            StateGraph stateGraph = new StateGraph(string.Format("OpponentNormal: {0}", base.Entrant.Opponent.OpponentName));
            State      state      = new State("initial");
            State      state2     = new State("countdown");
            State      state3     = new State("running");
            State      state4     = new State("raceover");
            State      state5     = new State("post");
            State      state6     = new State("paused");
            State      state7     = new State("aborted");
            State      state8     = new State("done");

            state.Transitions.Add(new Transition("countdown"));
            PrepareScoringMethod item     = new PrepareScoringMethod(base.InstancedEvent, base.Entrant);
            LockEntrant          item2    = new LockEntrant(base.InstancedEvent, base.Entrant, true);
            EntrantLoaded        item3    = new EntrantLoaded(base.InstancedEvent, base.Entrant, "Entrants.Loading");
            EnableKeyboard       item4    = new EnableKeyboard(true);
            EnableLoadingScreen  item5    = new EnableLoadingScreen(false);
            FlushTraffic         item6    = new FlushTraffic();
            FlushCops            item7    = new FlushCops();
            HandleTutorial       item8    = new HandleTutorial(base.InstancedEvent, base.Entrant, TutorialSource.kTutorialSource_Race);
            Countdown            activity = new Countdown(base.InstancedEvent, base.Entrant);
            TryPerfectLaunch     item9    = new TryPerfectLaunch(base.InstancedEvent, base.Entrant);
            LockEntrant          item10   = new LockEntrant(base.InstancedEvent, base.Entrant, false);

            GameCore.Workflow.Activities.WaitAll item11 = new GameCore.Workflow.Activities.WaitAll("Entrants.Countdown");
            SetSignal             item12    = new SetSignal("Entrants.Countdown");
            UnSetSignal           item13    = new UnSetSignal("Entrants.Countdown");
            Launch                item14    = new Launch(base.InstancedEvent, base.Entrant);
            RoutingTriggered      activity2 = new RoutingTriggered(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            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);
            EntrantFinished       activity7 = new EntrantFinished(base.InstancedEvent, base.Entrant, -8193);
            EntrantFinished       activity8 = new EntrantFinished(base.InstancedEvent, base.Entrant, 8202);
            KillAllFlashers       item15    = new KillAllFlashers(base.InstancedEvent, base.Entrant);
            Conclude              item16    = new Conclude(base.InstancedEvent, base.Entrant);
            SortEntrants          item17    = new SortEntrants(base.InstancedEvent);
            ReportEntrantFinished item18    = new ReportEntrantFinished(base.InstancedEvent, base.Entrant);

            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerEnter> activity9  = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerEnter>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerExit>  activity10 = new GameCore.Activities.Entrant.Components.SynchronizeOnReceive <OnTriggerExit>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            VehicleSpeedBasedReset activity11 = new VehicleSpeedBasedReset(base.Entrant, 0.1f);
            LoadBlackBoards        item19     = new LoadBlackBoards(base.InstancedEvent, BlackBoardFlag.kBlackBoardFlag_Countdown);
            PauseDetected          activity12 = new PauseDetected(base.InstancedEvent);

            if (base.Entrant.Opponent is LocalHumanOpponent)
            {
                state2.EnterActivity.Activities.Add(item2);
                state2.EnterActivity.Activities.Add(item);
                state2.EnterActivity.Activities.Add(item3);
                state2.EnterActivity.Activities.Add(item4);
                state2.EnterActivity.Activities.Add(item6);
                state2.EnterActivity.Activities.Add(item7);
                state2.EnterActivity.Activities.Add(item5);
                state2.EnterActivity.Activities.Add(item8);
                state2.EnterActivity.Activities.Add(item19);
                state2.Transitions.Add(new Transition("running", activity));
                state2.Transitions.Add(new Transition("aborted", activity12));
                state2.ExitActivity.Activities.Add(item9);
                state2.ExitActivity.Activities.Add(item12);
                state2.ExitActivity.Activities.Add(item11);
                state2.ExitActivity.Activities.Add(item13);
                state2.ExitActivity.Activities.Add(item14);
            }
            else
            {
                state2.EnterActivity.Activities.Add(item2);
                state2.EnterActivity.Activities.Add(item);
                state2.EnterActivity.Activities.Add(item3);
                state2.EnterActivity.Activities.Add(item5);
                state2.Transitions.Add(new Transition("running", activity));
                state2.ExitActivity.Activities.Add(item12);
                state2.ExitActivity.Activities.Add(item11);
                state2.ExitActivity.Activities.Add(item13);
                state2.ExitActivity.Activities.Add(item14);
            }
            state3.EnterActivity.Activities.Add(item10);
            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(activity9));
            state3.Transitions.Add(new Transition(activity10));
            state3.Transitions.Add(new Transition(activity11));
            state3.Transitions.Add(new Transition("raceover", activity7));
            state3.Transitions.Add(new Transition("aborted", activity8));
            state3.ExitActivity.Activities.Add(item15);
            OverrideVehicleControl item20 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Stop);
            EnableReplication      item21 = new EnableReplication(base.Entrant.Opponent.Vehicle, false);

            state4.EnterActivity.Activities.Add(item16);
            state4.EnterActivity.Activities.Add(item17);
            state4.EnterActivity.Activities.Add(item18);
            state4.EnterActivity.Activities.Add(item20);
            Abort item22 = new Abort(base.InstancedEvent, base.Entrant);

            state7.EnterActivity.Activities.Add(item22);
            if (base.Entrant.Opponent is LocalHumanOpponent)
            {
                LoadBlackBoards item23 = new LoadBlackBoards(base.Event, BlackBoardFlag.kBlackBoardFlag_Running);
                state3.EnterActivity.Activities.Add(item23);
                WrongWayNotification activity13 = new WrongWayNotification(base.InstancedEvent, base.Entrant);
                NavigateToGPSUpdater activity14 = new NavigateToGPSUpdater(base.InstancedEvent, base.Entrant, Ports.Gameplay);
                state3.Transitions.Add(new Transition(activity13));
                state3.Transitions.Add(new Transition(activity14));
                state4.EnterActivity.Activities.Add(new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_Audio, 2046860387u));
                state4.EnterActivity.Activities.Add(new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_AI, 331198907u));
                state4.EnterActivity.Activities.Add(item6);
                state4.Transitions.Add(new Transition("post"));
                PostEventScreen activity15 = new PostEventScreen(base.InstancedEvent, base.Entrant, Ports.Gameplay);
                AbortEvent      item24     = new AbortEvent(base.InstancedEvent);
                LobbyTick       activity16 = new LobbyTick(0.25f);
                state5.Transitions.Add(new Transition(activity16));
                state5.Transitions.Add(new Transition("done", activity15));
                FinishEntrant          item25 = new FinishEntrant(base.InstancedEvent, base.Entrant, FinishReason.PauseDetected);
                OverrideVehicleControl item26 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Release);
                state6.EnterActivity.Activities.Add(item25);
                state6.EnterActivity.Activities.Add(item15);
                state6.Transitions.Add(new Transition("aborted"));
                state7.EnterActivity.Activities.Add(item10);
                state8.EnterActivity.Activities.Add(item24);
                state8.EnterActivity.Activities.Add(item26);
            }
            else
            {
                state4.EnterActivity.Activities.Add(item21);
                state4.Transitions.Add(new Transition("done"));
            }
            state7.Transitions.Add(new Transition("done"));
            CleanupScoringMethod item27 = new CleanupScoringMethod(base.InstancedEvent, base.Entrant);

            state8.EnterActivity.Activities.Add(item27);
            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(state5);
            stateGraph.States.Add(state7);
            stateGraph.States.Add(state6);
            stateGraph.States.Add(state8);
            return(stateGraph);
        }
Пример #2
0
        // Token: 0x060013FE RID: 5118 RVA: 0x0001E6FC File Offset: 0x0001D6FC
        protected override WorkflowElement CreateBody()
        {
            StateGraph stateGraph = new StateGraph(string.Format("OpponentPursuit: {0}", base.Entrant.Opponent.OpponentName));
            State      state      = new State("initial");
            State      state2     = new State("countdown");
            State      state3     = new State("inpursuit");
            State      state4     = new State("cooldown");
            State      state5     = new State("busted");
            State      state6     = new State("evaded");
            State      state7     = new State("post");

            new State("aborted");
            State state8 = new State("done");

            GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitEngaged> activity  = new GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitEngaged>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            GameCore.Activities.Components.CloseOnReceive <OnPursuitBusted>          activity2 = new GameCore.Activities.Components.CloseOnReceive <OnPursuitBusted>(Ports.Gameplay);
            EntrantFinished      activity3 = new EntrantFinished(base.InstancedEvent, base.Entrant, -8193);
            EntrantFinished      activity4 = new EntrantFinished(base.InstancedEvent, base.Entrant, 8202);
            OnUpdateTick         activity5 = new OnUpdateTick(base.InstancedEvent, base.Entrant);
            Conclude             item      = new Conclude(base.InstancedEvent, base.Entrant);
            FlushCops            item2     = new FlushCops();
            LoadBehavior         item3     = new LoadBehavior(base.InstancedEvent, base.Entrant, "BEHAVIOR_GAMEPLAY_PURSUIT", "PursuitMonitorBehavior");
            EntrantLoaded        item4     = new EntrantLoaded(base.InstancedEvent, base.Entrant, "Entrants.Loading");
            PrepareScoringMethod item5     = new PrepareScoringMethod(base.InstancedEvent, base.Entrant);
            EnableLoadingScreen  item6     = new EnableLoadingScreen(false);
            HandleTutorial       item7     = new HandleTutorial(base.InstancedEvent, base.Entrant, TutorialSource.kTutorialSource_Pursuit);
            Launch item8 = new Launch(base.InstancedEvent, base.Entrant);
            AssignPursuitEscalation item9 = new AssignPursuitEscalation(base.Event.EventDef.PursuitEscalation().GetKey());

            state.EnterActivity.Activities.Add(item3);
            state.Transitions.Add(new Transition("countdown"));
            LockEntrant                 item10    = new LockEntrant(base.InstancedEvent, base.Entrant, true);
            EnableKeyboard              item11    = new EnableKeyboard(true);
            FlushTraffic                item12    = new FlushTraffic();
            LoadBlackBoards             item13    = new LoadBlackBoards(base.Event, BlackBoardFlag.kBlackBoardFlag_Running);
            Countdown                   activity6 = new Countdown(base.InstancedEvent, base.Entrant);
            TryPerfectLaunch            item14    = new TryPerfectLaunch(base.InstancedEvent, base.Entrant);
            LockEntrant                 item15    = new LockEntrant(base.InstancedEvent, base.Entrant, false);
            LaunchPursuitByOpponentHeat item16    = new LaunchPursuitByOpponentHeat(base.InstancedEvent, base.Entrant);

            state2.EnterActivity.Activities.Add(item10);
            state2.EnterActivity.Activities.Add(item9);
            state2.EnterActivity.Activities.Add(item5);
            state2.EnterActivity.Activities.Add(item4);
            state2.EnterActivity.Activities.Add(item11);
            state2.EnterActivity.Activities.Add(item12);
            state2.EnterActivity.Activities.Add(item6);
            state2.EnterActivity.Activities.Add(item13);
            state2.EnterActivity.Activities.Add(item7);
            state2.Transitions.Add(new Transition("inpursuit", activity6));
            state2.ExitActivity.Activities.Add(item14);
            state2.ExitActivity.Activities.Add(item8);
            state2.ExitActivity.Activities.Add(item15);
            state2.ExitActivity.Activities.Add(item16);
            VisualEffect           item17 = new VisualEffect(EffectType.ENTER_COP_PURSUIT);
            EnablePointsOfInterest item18 = new EnablePointsOfInterest(4291711951u, true);

            GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitCooldown> activity7 = new GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitCooldown>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            EnablePointsOfInterest item19 = new EnablePointsOfInterest(4291711951u, false);

            state3.EnterActivity.Activities.Add(item17);
            state3.EnterActivity.Activities.Add(item18);
            state3.Transitions.Add(new Transition("cooldown", activity7));
            state3.Transitions.Add(new Transition("busted", activity2));
            state3.Transitions.Add(new Transition("done", activity4));
            state3.Transitions.Add(new Transition(activity5));
            state3.ExitActivity.Activities.Add(item19);
            EnablePointsOfInterest item20 = new EnablePointsOfInterest(3470858927u, true);

            GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitEvaded> activity8 = new GameCore.Activities.Entrant.Components.CloseOnReceive <OnPursuitEvaded>(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            EnablePointsOfInterest item21 = new EnablePointsOfInterest(3470858927u, false);
            HandleTutorial         item22 = new HandleTutorial(base.InstancedEvent, base.Entrant, TutorialSource.kTutorialSource_PursuitCooldown);

            state4.EnterActivity.Activities.Add(item20);
            state4.EnterActivity.Activities.Add(item22);
            state4.Transitions.Add(new Transition("inpursuit", activity));
            state4.Transitions.Add(new Transition("evaded", activity8));
            state4.Transitions.Add(new Transition("busted", activity2));
            state4.Transitions.Add(new Transition("done", activity4));
            state4.Transitions.Add(new Transition(activity5));
            state4.ExitActivity.Activities.Add(item21);
            FinishEntrant activity9 = new FinishEntrant(base.InstancedEvent, base.Entrant, FinishReason.Evaded);
            HardwareBlinkingEffectEntrant item23 = new HardwareBlinkingEffectEntrant(base.InstancedEvent, base.Entrant, 4278216447u, 3.8f, 0.4f);

            state6.EnterActivity.Activities.Add(item23);
            state6.Transitions.Add(new Transition("post", activity3));
            state6.Transitions.Add(new Transition("done", activity4));
            state6.Transitions.Add(new Transition(activity9));
            state6.ExitActivity.Activities.Add(item);
            FinishEntrant activity10             = new FinishEntrant(base.InstancedEvent, base.Entrant, FinishReason.Busted);
            HardwareBlinkingEffectEntrant item24 = new HardwareBlinkingEffectEntrant(base.InstancedEvent, base.Entrant, 4294901760u, 3f, 0.1f);
            Bust item25 = new Bust(base.InstancedEvent, base.Entrant);

            state5.EnterActivity.Activities.Add(item24);
            state5.Transitions.Add(new Transition("post", activity3));
            state5.Transitions.Add(new Transition("done", activity4));
            state5.Transitions.Add(new Transition(activity10));
            state5.ExitActivity.Activities.Add(item25);
            OverrideVehicleControl item26     = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Stop);
            ReleaseBehavior        item27     = new ReleaseBehavior(base.InstancedEvent, base.Entrant, "BEHAVIOR_GAMEPLAY_PURSUIT");
            PostEventScreen        activity11 = new PostEventScreen(base.InstancedEvent, base.Entrant, Ports.Gameplay);
            ChangeBlackBoard       item28     = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_Audio, 3114481865u);
            ChangeBlackBoard       item29     = new ChangeBlackBoard(BlackBoardChannel.kBlackBoard_AI, 331198907u);

            state7.EnterActivity.Activities.Add(item28);
            state7.EnterActivity.Activities.Add(item29);
            state7.EnterActivity.Activities.Add(item26);
            state7.EnterActivity.Activities.Add(item2);
            state7.EnterActivity.Activities.Add(item12);
            state7.EnterActivity.Activities.Add(item27);
            state7.Transitions.Add(new Transition("done", activity11));
            OverrideVehicleControl item30 = new OverrideVehicleControl(base.Entrant.Opponent.Vehicle, OverrideVehicleControl.Control.Release);
            CleanupScoringMethod   item31 = new CleanupScoringMethod(base.InstancedEvent, base.Entrant);

            state8.EnterActivity.Activities.Add(item30);
            state8.EnterActivity.Activities.Add(item31);
            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(state5);
            stateGraph.States.Add(state6);
            stateGraph.States.Add(state7);
            stateGraph.States.Add(state8);
            return(stateGraph);
        }