private void ParseToolTip() { string path = NrTSingleton <UIDataManager> .Instance.FilePath + "TextPreloading/LoadingToolTip"; TextAsset textAsset = (TextAsset)CResources.Load(path); if (null == textAsset) { TsLog.Log("Failed TextPreloading/LoadingToolTip", new object[0]); return; } char[] separator = new char[] { '\t' }; string[] array = textAsset.text.Split(new char[] { '\n' }); for (int i = 1; i < array.Length; i++) { if (!(string.Empty == array[i])) { string[] array2 = array[i].Split(separator); NewLoadingText newLoadingText = new NewLoadingText(); newLoadingText.m_szTextKey = array2[0]; newLoadingText.m_nMinLV = int.Parse(array2[1]); newLoadingText.m_nMaxLV = int.Parse(array2[2]); if (UIDataManager.IsUse256Texture()) { newLoadingText.m_szBundlePath = array2[4]; } else { newLoadingText.m_szBundlePath = array2[3]; } newLoadingText.m_nShowType = int.Parse(array2[5]); this.m_LoadingText.Add(newLoadingText); } } Resources.UnloadAsset(textAsset); CResources.Delete(path); }
public void SetShowHide(bool bShow) { if (bShow) { if (!base.Visible) { NrTSingleton <NrGlobalReference> .Instance.GetDownloadInfo().ResetSceneDownloadSize(); int num = 1; if (PlayerPrefs.HasKey(NrPrefsKey.PLAYER_LEVEL)) { num = PlayerPrefs.GetInt(NrPrefsKey.PLAYER_LEVEL); } else { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo != null) { num = charPersonInfo.GetLevel(0L); } } List <NewLoadingText> list = new List <NewLoadingText>(); foreach (NewLoadingText current in this.m_LoadingText) { if (num >= current.m_nMinLV && num <= current.m_nMaxLV) { list.Add(current); } } if (0 < list.Count) { int index = UnityEngine.Random.Range(0, list.Count); NewLoadingText newLoadingText = list[index]; if (newLoadingText != null && this.m_Tip != null) { this.m_Tip.Visible = true; this.m_Tip.Text = NrTSingleton <CTextParser> .Instance.GetTextColor("1002") + NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText(newLoadingText.m_szTextKey); if (string.Empty != newLoadingText.m_szBundlePath) { this.m_Left.color = new Color(0f, 0f, 0f, 0f); this.m_Center.color = new Color(0f, 0f, 0f, 0f); if (newLoadingText.m_nShowType == 1) { this.m_Left.Visible = true; this.m_Center.Visible = false; this.m_Left.SetFadeTextureFromBundle(newLoadingText.m_szBundlePath); } else if (newLoadingText.m_nShowType == 2) { this.m_Left.Visible = false; this.m_Center.Visible = true; this.m_Center.SetFadeTextureFromBundle(newLoadingText.m_szBundlePath); } } } } else { this.m_Tip.Visible = false; } list.Clear(); this.Show(); } } else if (base.Visible) { this.m_Left.DeleteMat(); this.m_Center.DeleteMat(); this.Hide(); if (Scene.CurScene == Scene.Type.WORLD && Scene.PreScene != Scene.Type.SOLDIER_BATCH) { NrTSingleton <UIImageBundleManager> .Instance.DeleteTexture(); } } }