public override void OnEnter() { string text = string.Format("{0} OnEnter OnEnter Memory = {1}MB", base.GetType().FullName, NrTSingleton <NrMainSystem> .Instance.AppMemory); TsPlatform.FileLog(text); TsLog.LogWarning(text, new object[0]); TsLog.Log("====== {0}.OnEnter", new object[] { base.GetType().FullName }); Scene.ChangeSceneType(this.SceneType()); NrMainSystem.CheckAndSetReLoginMainCamera(); Camera.main.gameObject.AddComponent <DefaultCameraController>(); TsCaching.useCustomCacheOnly = true; base.StartTaskSerial(CommonTasks.InitializeChangeScene()); base.StartTaskSerial(this._RequestPredownloadTables()); base.StartTaskSerial(this._CheckRePredownload(1)); base.StartTaskSerial(this._CheckRePredownload(2)); base.StartTaskSerial(this._CheckRePredownload(3)); base.StartTaskSerial(this._DownloadAssetBundles()); base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true)); base.StartTaskPararell(this._PredownloadProgressUpdate()); }
public override void OnEnter() { if (StageNPatchLauncher.Instance != null) { StageNPatchLauncher.Instance = this; } if (this.PreDownloadDlg == null) { NrLoadPageScreen.ShowHideLoadingImg(false); this.PreDownloadDlg = (Mobile_PreDownloadDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.PREDOWNLOAD_DLG); } string text = string.Format("{0} OnEnter OnEnter Memory = {1}MB", base.GetType().FullName, NrTSingleton <NrMainSystem> .Instance.AppMemory); TsPlatform.FileLog(text); TsLog.LogWarning(text, new object[0]); TsLog.Log("====== {0}.OnEnter", new object[] { base.GetType().FullName }); Scene.ChangeSceneType(this.SceneType()); NrMainSystem.CheckAndSetReLoginMainCamera(); Camera.main.gameObject.AddComponent <DefaultCameraController>(); TsCaching.useCustomCacheOnly = true; int num = 0; if (!int.TryParse(NrTSingleton <NrGlobalReference> .Instance.ResourcesVer, out num)) { UnityEngine.Debug.LogError(string.Concat(new object[] { "======================== end", NrTSingleton <NrGlobalReference> .Instance.ResourcesVer, "== ", num })); if (TsPlatform.IsAndroid) { NrTSingleton <NrMainSystem> .Instance.QuitGame(false); } else if (TsPlatform.IsIPhone) { NrTSingleton <NrMainSystem> .Instance.m_ReLogin = false; NrTSingleton <NrMainSystem> .Instance.m_Login_BG = true; NrTSingleton <NrGlobalReference> .Instance.localWWW = true; NrTSingleton <NrMainSystem> .Instance.ReLogin(false); } return; } string text2 = string.Format("http://{0}", NrTSingleton <NrGlobalReference> .Instance.GetCurrentServiceAreaInfo().szOriginalDataCDNPath); UnityEngine.Debug.LogError("======================== WebPath url : " + text2); NPatchLauncherBehaviour.PatchStart(this.m_strLocalFilePath, text2, new NPatchLauncherHandler_forInGame(), false, num, false, string.Empty); if (this.PreDownloadDlg != null) { this.PreDownloadDlg.SetText("Check File..."); } StageNPatchLauncher.DownloadOmniataLog(true); base.StartTaskSerial(CommonTasks.InitializeChangeScene()); base.StartTaskPararell(this._PatchWorkflow()); base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true)); this.bPatchEnd = false; if (!Launcher.Instance.IsFullPatchLevel) { NrTSingleton <MATEventManager> .Instance.MeasureEvent("Content DL Start"); } else { NrTSingleton <MATEventManager> .Instance.MeasureEvent("Add Content DL start"); } }
public override void InitializeComponent() { UIBaseFileManager instance = NrTSingleton <UIBaseFileManager> .Instance; Form form = this; instance.LoadFile(ref form, "stage/dlg_preloadingpage", G_ID.PREDOWNLOAD_DLG, false); instance.CreateControl(ref this.textureBG_Img, "DrawTexture_DrawTexture0"); instance.CreateControl(ref this.textureBG_Img1, "DrawTexture_DrawTexture1"); instance.CreateControl(ref this.ProgressBar_ProgressBar1, "DrawTexture1"); instance.CreateControl(ref this.ProgressBar_ProgressBar2, "DrawTexture2"); instance.CreateControl(ref this.m_Percent, "Label_Label3"); instance.CreateControl(ref this.m_FilePercent, "Label_Label4"); instance.CreateControl(ref this.m_Text, "Label_text"); instance.CreateControl(ref this.btnGameStart, "Button_GameStart"); instance.CreateControl(ref this.Drawtexture_DTBG03, "DT_BG03"); instance.CreateControl(ref this.DT_Portrait01, "DT_Portrait01"); instance.CreateControl(ref this.DT_Portrait02, "DT_Portrait02"); instance.CreateControl(ref this.DT_Portrait03, "DT_Portrait03"); instance.CreateControl(ref this.DT_CharVoice01, "DT_CharVoice01"); instance.CreateControl(ref this.DT_CharView, "DT_CharView"); instance.CreateControl(ref this.DT_DrawTexture_DrawTexture29, "DrawTexture_DrawTexture29"); instance.CreateControl(ref this.LB_CharName01, "LB_CharName01"); instance.CreateControl(ref this.LB_CVName01, "LB_CVName01"); instance.CreateControl(ref this.LB_CVName02, "LB_CVName02"); instance.CreateControl(ref this.BT_PlayVoice, "BT_PlayVoice"); instance.CreateControl(ref this.LB_Charinfo01, "LB_Charinfo01"); instance.CreateControl(ref this.m_txTouchArea, "TouchArea"); instance.CreateControl(ref this.DrawTexture_NameLine, "DrawTexture_NameLine"); instance.CreateControl(ref this.Toggle_Portrait01, "Toggle_Portrait01"); instance.CreateControl(ref this.Toggle_Portrait02, "Toggle_Portrait02"); instance.CreateControl(ref this.Toggle_Portrait03, "Toggle_Portrait03"); this.Toggle_Portrait01.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickTabControl)); this.Toggle_Portrait02.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickTabControl)); this.Toggle_Portrait03.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickTabControl)); instance.CreateControl(ref this.BT_PlayMovie, "BT_PlayMovie"); instance.CreateControl(ref this.DT_IntroMovie, "DT_IntroMovie"); instance.CreateControl(ref this.LB_Open, "Label_Opening"); this.BT_PlayMovie.AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickPlayMovie)); this.ProgressBar_ProgressBar1.transform.localScale = new Vector3(1.2f, 1f, 1f); this.m_fSize = this.ProgressBar_ProgressBar1.GetSize().x; this.m_fMaxSize = this.ProgressBar_ProgressBar1.GetSize().x * 1.2f; this.ProgressBar_ProgressBar1.SetTextureUVs(new Vector2(0f, 943f), new Vector2(0f, 30f)); this.ProgressBar_ProgressBar2.transform.localScale = new Vector3(1.2f, 1f, 1f); this.m_fSize = this.ProgressBar_ProgressBar2.GetSize().x; this.m_fMaxSize = this.ProgressBar_ProgressBar2.GetSize().x * 1.2f; this.ProgressBar_ProgressBar2.SetTextureUVs(new Vector2(0f, 943f), new Vector2(0f, 30f)); NrMainSystem.CheckAndSetReLoginMainCamera(); this.BgColor = Camera.main.backgroundColor; if (Scene.CurScene == Scene.Type.PREDOWNLOAD || Scene.CurScene == Scene.Type.NPATCH_DOWNLOAD) { Camera.main.backgroundColor = this.BgColor; } this.SetTotalProgress(0f, 0f, string.Empty); this.m_Percent.Visible = false; this.m_FilePercent.Visible = false; this.m_Text.Visible = false; this.textureBG_Img.Visible = false; this.textureBG_Img1.Visible = false; this.ProgressBar_ProgressBar1.Visible = false; this.ProgressBar_ProgressBar2.Visible = false; base.ShowSceneType = FormsManager.FORM_TYPE_MAIN; this.pTouchEffectPrefab = (CResources.LoadClone(NrTSingleton <UIDataManager> .Instance.FilePath + "Prefabs/fx_fingerpoint_ui") as GameObject); CResources.Delete(NrTSingleton <UIDataManager> .Instance.FilePath + "Prefabs/fx_fingerpoint_ui"); this.pTouchVoiceObject = new GameObject("TouchVoiceObject"); this.pTouchVoiceObject.transform.position = new Vector3(0f, 0f, -10f); this.pTouchVoiceObject.AddComponent <AudioSource>(); this.m_txTouchArea.AddValueChangedDelegate(new EZValueChangedDelegate(this.On_Click_Ani)); this.btnGameStart.SetLocation(GUICamera.width / 2f - this.btnGameStart.GetSize().x / 2f, GUICamera.height - 110f, -1f); this.btnGameStart.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("2014")); this.btnGameStart.AddValueChangedDelegate(new EZValueChangedDelegate(this.On_Click_GameStart)); this.btnGameStart.Visible = false; }
public override void OnEnter() { string text = string.Format("{0} OnEnter OnEnter Memory = {1}MB", base.GetType().FullName, TsPlatform.Operator.GetAppMemory()); TsPlatform.FileLog(text); TsLog.LogWarning(text, new object[0]); if (!TsPlatform.IsEditor && TsPlatform.IsAndroid && SystemInfo.processorCount < 2) { IntroMsgBoxDlg introMsgBoxDlg = (IntroMsgBoxDlg)NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.INTROMSGBOX_DLG); if (introMsgBoxDlg != null) { string textFromPreloadText = NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("10"); introMsgBoxDlg.SetBtnChangeName(NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8")); introMsgBoxDlg.SetMsg(null, null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("8"), textFromPreloadText, eMsgType.MB_OK); } } if (TsPlatform.IsEditor) { NmMainFrameWork.AddBGM(); } if (TsPlatform.IsAndroid) { PlayGamesPlatform.DebugLogEnabled = true; PlayGamesPlatform.Activate(); } TsLog.Log("====== {0}.OnEnter", new object[] { base.GetType().FullName }); Scene.ChangeSceneType(this.SceneType()); if (Camera.main != null && Camera.main.gameObject != null) { DefaultCameraController component = Camera.main.gameObject.GetComponent <DefaultCameraController>(); if (component == null) { Camera.main.gameObject.AddComponent <DefaultCameraController>(); } GameObject target = GameObject.Find("MainFramework"); UnityEngine.Object.DontDestroyOnLoad(target); } else { NrMainSystem.CheckAndSetReLoginMainCamera(); } if (NrTSingleton <NrMainSystem> .Instance.m_ReLogin) { TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.WorldScene); TsSceneSwitcher.Instance.DeleteScene(TsSceneSwitcher.ESceneType.BattleScene); base.StartTaskSerial(this.LoadLoginSleep()); base.StartTaskSerial(CommonTasks.LoadEmptyMainScene()); base.StartTaskSerial(CommonTasks.ClearAudioStack()); base.StartTaskSerial(CommonTasks.MemoryCleaning(true, 8)); NmMainFrameWork.LoadImage(); NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.LOGINBG_DLG); } base.StartTaskSerial(CommonTasks.SetGUIBehaviourScene()); if (!NrTSingleton <NrMainSystem> .Instance.m_ReLogin && TsPlatform.IsEditor) { string strFileName = string.Format("{0}/../SystemData/ServerList.txt", Application.dataPath); NrConnectTable nrConnectTable = new NrConnectTable(); nrConnectTable.AddServerList(strFileName); } if (!TsPlatform.IsEditor) { base.StartTaskSerial(this._RequestNoticeCheck()); base.StartTaskSerial(this._RequestNoticePage()); NrTSingleton <NrMainSystem> .Instance.m_bIsAutoLogin = true; } base.StartTaskSerial(this._RequestLoginNexonAuthorize()); base.StartTaskSerial(this._StageProcess()); base.StartTaskSerial(CommonTasks.FinalizeChangeScene(true)); }