Esempio n. 1
0
        protected override void DoLoadingForGameManager(
            GameManagerLoadingSteps gameManagerLoadingStep,
            out GameManagerLoadingSteps nextStep)
        {
            nextStep = GameManagerLoadingSteps.None;
            switch (gameManagerLoadingStep)
            {
            case GameManagerLoadingSteps.PreInitializeZerothStep:
                nextStep = GameManagerLoadingSteps.FirstInitializeFirstStep;
                break;

            case GameManagerLoadingSteps.FirstInitializeFirstStep:
                LoadModuleData(false);
                nextStep = GameManagerLoadingSteps.WaitSecondStep;
                break;

            case GameManagerLoadingSteps.WaitSecondStep:
                StartNewGame();
                nextStep = GameManagerLoadingSteps.SecondInitializeThirdState;
                break;

            case GameManagerLoadingSteps.SecondInitializeThirdState:
                MBGlobals.InitializeReferences();
                {
                    MBDebug.Print("Initializing new game begin...");
                    var campaign = new Campaign();
                    TaleWorlds.Core.Game.CreateGame(campaign, this);
                    campaign.SetLoadingParameters(TaleWorlds.CampaignSystem.Campaign.GameLoadingType.NewCampaign, _seed);
                    MBDebug.Print("Initializing new game end...");
                }
                TaleWorlds.Core.Game.Current.DoLoading();
                nextStep = GameManagerLoadingSteps.PostInitializeFourthState;
                break;

            case GameManagerLoadingSteps.PostInitializeFourthState:
                bool flag = true;
                foreach (MBSubModuleBase subModule in Module.CurrentModule.SubModules)
                {
                    flag = flag && subModule.DoLoading(TaleWorlds.Core.Game.Current);
                }
                nextStep = flag ? GameManagerLoadingSteps.FinishLoadingFifthStep : GameManagerLoadingSteps.PostInitializeFourthState;
                break;

            case GameManagerLoadingSteps.FinishLoadingFifthStep:
                nextStep = TaleWorlds.Core.Game.Current.DoLoading() ? GameManagerLoadingSteps.None : GameManagerLoadingSteps.FinishLoadingFifthStep;
                EnhancedBattleTestPartyController.Initialize();
                break;
            }
        }
Esempio n. 2
0
        public override void OnGameEnd(TaleWorlds.Core.Game game)
        {
            base.OnGameEnd(game);

            EnhancedBattleTestPartyController.OnGameEnd();
        }