示例#1
0
 private void OnStartupTaskComplete()
 {
     Service.Get <SquadController>().ServerManager.EnablePolling();
     GameServicesManager.Startup();
     if (!Service.Get <CurrentPlayer>().HasNotCompletedFirstFueStep())
     {
         GameServicesManager.OnReady();
     }
     if (!Service.Get <CurrentPlayer>().CampaignProgress.FueInProgress)
     {
         Service.Get <ISocialDataController>().CheckFacebookLoginOnStartup();
     }
     Service.Get <WorldInitializer>().View.StartMapManipulation();
     Service.Get <UserInputManager>().Enable(true);
     Service.Get <UXController>().HUD.ReadyToToggleVisiblity = true;
     Service.Get <RUFManager>().PrepareReturningUserFlow();
     Service.Get <EventManager>().SendEvent(EventId.StartupTasksCompleted, null);
 }
示例#2
0
 private void Done()
 {
     Service.Get <EventManager>().UnregisterObserver(this, EventId.IntroComplete);
     if (this.animation != null)
     {
         this.animation = null;
         Service.Get <UXController>().Intro = null;
         Service.Get <UXController>().HUD.ConfigureControls(new HudConfig(new string[0]));
         Service.Get <UXController>().HUD.Visible = true;
         if (Service.Get <CurrentPlayer>().HasNotCompletedFirstFueStep() && GameConstants.START_FUE_IN_BATTLE_MODE)
         {
             Service.Get <GameStateMachine>().SetState(new FueBattleStartState(GameConstants.FUE_BATTLE));
             Service.Get <BattleController>().PrepareWorldForBattle();
             return;
         }
         GameServicesManager.OnReady();
         HomeState.GoToHomeState(null, true);
     }
 }