public void ShowTouchButton(CQuest quest) { if (quest == null) { return; } this.m_kQuest = quest; NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); if (charPersonInfo == null) { return; } int level = charPersonInfo.GetLevel(0L); if (3 >= level) { if ("10101_005" == quest.GetQuestUnique()) { return; } QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(quest.GetQuestUnique()); if ((null == this.m_Touch && quest.IsAutoMoveQuest()) || questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE) { if (null != this.m_Touch) { return; } this.m_Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f); this.m_Touch.PlayAni(true); base.InteractivePanel.MakeChild(this.m_Touch.gameObject); this.m_Touch.SetLocation(-this.m_Touch.GetSize().x + 85f, 0f, this.m_kQuestList.GetLocation().z - 1f); BoxCollider component = this.m_Touch.gameObject.GetComponent <BoxCollider>(); if (null != component) { UnityEngine.Object.Destroy(component); } } } else { if (null != this.m_Touch) { base.InteractivePanel.RemoveChild(this.m_Touch.gameObject); UnityEngine.Object.Destroy(this.m_Touch.gameObject); } this.m_kQuest = null; } }
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(); } } }
public void SetListFriendRank() { NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MATCHPOINT); UI_RANKINFO item = new UI_RANKINFO(charPersonInfo.GetCharName(), (byte)charPersonInfo.GetLevel(0L), charSubData); this.ListRankInfo.Add(item); this.ListRankInfo.Sort(new Comparison <UI_RANKINFO>(PlunderRankInfoDlg.CompareMatchPoint)); int num = 1; foreach (UI_RANKINFO current in this.ListRankInfo) { current.i32Rank = num; num++; } foreach (UI_RANKINFO current2 in this.ListRankInfo) { if (current2.Charname == charPersonInfo.GetCharName()) { this.TargetInfo = current2; this.i32NewRank = this.TargetInfo.i32Rank; break; } } }