/// <summary> /// Inicializes the quick launche. /// </summary> private void InitQuickLaunch() { MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyMinerGame()::InitQuickLaunch"); MyMwcQuickLaunchType?quickLaunch = MyMwcFinalBuildConstants.QUICK_LAUNCH; #if AUTOBUILD quickLaunch = MyMwcQuickLaunchType.NEW_STORY; #endif // This will work as auto-login, but it will not depend on auto-login config variable // It just always tries to auto-login. If auto-login fails, normal login screen will be displayed. string username = MyConfig.Username; string password = MyConfig.Password; if (quickLaunch != null) { switch (quickLaunch.Value) { case MyMwcQuickLaunchType.EDITOR_SANDBOX: { MyGuiManager.AddScreen(new MyGuiScreenLoginProgress(username, password, new MyGuiScreenStartQuickLaunch( quickLaunch.Value, MyTextsWrapperEnum.StartEditorInProgressPleaseWait), null)); } break; case MyMwcQuickLaunchType.LAST_SANDBOX: case MyMwcQuickLaunchType.NEW_STORY: { MyGuiManager.AddScreen(new MyGuiScreenLoginProgress(username, password, new MyGuiScreenStartQuickLaunch( quickLaunch.Value, MyTextsWrapperEnum.StartGameInProgressPleaseWait), null)); } break; case MyMwcQuickLaunchType.LOAD_CHECKPOINT: { MyGuiManager.AddScreen(new MyGuiScreenLoginProgress(username, password, new MyGuiScreenStartQuickLaunch( quickLaunch.Value, MyTextsWrapperEnum.StartGameInProgressPleaseWait), null)); } break; case MyMwcQuickLaunchType.SANDBOX_RANDOM: { MyGuiManager.AddScreen(new MyGuiScreenLoginProgress(username, password, new MyGuiScreenStartQuickLaunch( quickLaunch.Value, MyTextsWrapperEnum.StartGameInProgressPleaseWait), null)); } break; default: { throw new MyMwcExceptionApplicationShouldNotGetHere(); } } } else { if (MyFakes.MWBUILDER) { MyGuiManager.AddScreen(new MyGuiScreenLoginProgress(username, password, new MyGuiScreenStartQuickLaunch( MyMwcQuickLaunchType.EDITOR_SANDBOX, MyTextsWrapperEnum.StartEditorInProgressPleaseWait), null)); } else { if (MyFakes.ENABLE_LOGOS) { MyGuiManager.BackToIntroLogos(new Action(AfterLogos)); } else { AfterLogos(); } } } MinerWars.AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock(); }