public void Relogin(string parameters) { if (BuildOption.Instance.IsRunup) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(parameters); if (tokens != null && tokens.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.RUNUP; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } else if (BuildOption.Instance.IsNetmarble) { if (token.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.NETMARBLE; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } else { token = CommandInterpreter.ExtractValueFromParameter(parameters, "loginToken", string.Empty); if (token.Length > 0) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.INFERNUM; string a = CommandInterpreter.ExtractValueFromParameter(parameters, "sitecode", string.Empty).ToLower(); if (a == "steam" && !SteamManager.Instance.LoadSteamDll()) { Debug.Log("SteamAPI_Init Failed"); } CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } } } }
private void MoveNext() { if (Application.CanStreamedLevelBeLoaded("Login") && Application.CanStreamedLevelBeLoaded("PlayerInfo") && Application.CanStreamedLevelBeLoaded("BfStart") && Application.CanStreamedLevelBeLoaded("Tos")) { if (BuildOption.Instance.IsRunup) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(WebParam.Instance.Parameters); if (tokens == null || tokens.Length <= 0) { tokens = CommandInterpreter.ExtractValueFromParameterByRunup(); } if (tokens == null || tokens.Length <= 0) { if (BuildOption.Instance.MustAutoLogin) { BuildOption.Instance.HardExit(); } else { Application.LoadLevel("Login"); } } else { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.RUNUP; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN_TO_RUNUP; } } } else { token = CommandInterpreter.ExtractValueFromParameter(WebParam.Instance.Parameters, "loginToken", string.Empty); if (token.Length <= 0) { token = CommandInterpreter.ExtractValueFromParameter("loginToken", string.Empty); } if (BuildOption.Instance.IsNetmarble) { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.NETMARBLE; CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN_TO_NETMARBLE; } } else if (token.Length <= 0) { Application.LoadLevel("Login"); } else { MyInfoManager.Instance.AutoLogin = MyInfoManager.AUTOLOGIN.INFERNUM; string a = CommandInterpreter.ExtractValueFromParameter("sitecode", string.Empty).ToLower(); if (a == "steam" && !SteamManager.Instance.LoadSteamDll()) { Debug.Log("SteamAPI_Init Failed"); } CSNetManager.Instance.SwitchAfter = new SockTcp(); if (!CSNetManager.Instance.SwitchAfter.Open(CSNetManager.Instance.RoundRobinIp, CSNetManager.Instance.RoundRobinPort)) { BuildOption.Instance.Exit(); } else { if (CSNetManager.Instance.Sock != null) { CSNetManager.Instance.Sock.Close(); } step = STEP.AUTO_LOGIN; } } } } }
private void Update() { if (!once && SceneLoadManager.Instance.IsLoadedDone()) { once = true; CommandInterpreter.Instance.Load(); BuffManager.Instance.Load(); DefenseManager.Instance.LoadAll(); UpgradePropManager.Instance.LoadAll(); if (BuildOption.Instance.Props.isluncherExecuteOnly && (BuildOption.Instance.IsNetmarble || BuildOption.Instance.target == BuildOption.TARGET.WAVE_REAL || BuildOption.Instance.IsAxeso5)) { string a = CommandInterpreter.ExtractValueFromParameter("luncher", string.Empty); if (a != "use") { ExitConfirmDialog exitConfirmDialog = (ExitConfirmDialog)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.EXIT_CONFIRM, exclusive: true); if (exitConfirmDialog != null) { exitConfirmDialog.InitDialog(StringMgr.Instance.Get("LUNCHER_MUST_EXCUTE")); exitConfirmDialog.CloseButtonHide(isHide: true); } isProgressStop = true; } } if (!BuildOption.Instance.Props.isDuplicateExcuteAble && !isProgressStop && !BuildOption.Instance.IsDuplicateExcute()) { ExitConfirmDialog exitConfirmDialog2 = (ExitConfirmDialog)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.EXIT_CONFIRM, exclusive: true); if (exitConfirmDialog2 != null) { exitConfirmDialog2.InitDialog(StringMgr.Instance.Get("DUPLICATE_EXCUTE")); exitConfirmDialog2.CloseButtonHide(isHide: true); } isProgressStop = true; } if (VersionTextureManager.Instance.moviePublisher != null) { VersionTextureManager.Instance.moviePublisher.Play(); if (VersionTextureManager.Instance.moviePublisher.audioClip != null) { AudioSource component = GetComponent <AudioSource>(); if (null != component) { component.mute = false; component.clip = VersionTextureManager.Instance.moviePublisher.audioClip; component.Stop(); component.Play(); } } } } if (!onceusk && BuffManager.Instance.IsLoaded) { onceusk = true; DownLoadAssetBundleUsk(); } if (!onceItem && UskManager.Instance.bLoaded) { onceItem = true; DownLoadAssetBundleSounds(); PimpManager.Instance.Load(); TItemManager.Instance.LoadAll(); BrickManager.Instance.ChangeUskDecals(); LevelUpCompensationManager.Instance.Load(); MissionLoadManager.Instance.Load(); } if (!onceShop && TItemManager.Instance.IsLoaded) { onceShop = true; ShopManager.Instance.Load(); BundleManager.Instance.Load(); } deltaTime += Time.deltaTime; switch (step) { case STEP.AUTO_LOGIN: case STEP.AUTO_LOGIN_TO_RUNUP: case STEP.AUTO_LOGIN_TO_NETMARBLE: break; case STEP.PUBLISHER: if (isFadeIn) { if (deltaTime > fadeInTime) { FadeOut(); } else if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetKeyDown(KeyCode.Escape)) { Bang(); step = STEP.DEVELOPER; FadeIn(); } else { alpha = Mathf.Lerp(alphaFrom, alphaTo, deltaTime / fadeInTime); } } else if (deltaTime > fadeOutTime) { step = STEP.DEVELOPER; FadeIn(); } else { alpha = Mathf.Lerp(alphaFrom, alphaTo, deltaTime / fadeOutTime); } break; case STEP.DEVELOPER: if (isFadeIn) { if (deltaTime > fadeInTime) { FadeOut(); } else if (custom_inputs.Instance.GetButtonDown("K_FIRE1") || custom_inputs.Instance.GetButtonDown("K_MAIN_MENU")) { Bang(); FadeOut(); } else { alpha = Mathf.Lerp(alphaFrom, alphaTo, deltaTime / fadeInTime); } } else if (deltaTime > fadeOutTime) { MoveNext(); } else { alpha = Mathf.Lerp(alphaFrom, alphaTo, deltaTime / fadeOutTime); } break; case STEP.MOVIE_PUBLISHER: if (VersionTextureManager.Instance.moviePublisher != null && VersionTextureManager.Instance.moviePublisher.audioClip != null) { if (!VersionTextureManager.Instance.moviePublisher.isPlaying) { step = STEP.DEVELOPER; AudioSource component2 = GetComponent <AudioSource>(); if (null != component2) { component2.Stop(); } FadeIn(); } else if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1) || Input.GetKeyDown(KeyCode.Escape)) { step = STEP.DEVELOPER; AudioSource component3 = GetComponent <AudioSource>(); if (null != component3) { component3.Stop(); } FadeIn(); } } else { step = STEP.DEVELOPER; AudioSource component4 = GetComponent <AudioSource>(); if (null != component4) { component4.Stop(); } FadeIn(); } break; } }