public List <ChaseTask> GetGaidenTasks(GaidenTaskInfo gaiden) { if (gaiden == null || !gaidenInfoDic.ContainsKey(gaiden) || !gaidenInfoDic[gaiden]) { return(null); } return(gaidenTaskDic.Get(gaiden.taskType)); }
private void OnItemClick(RectTransform rt, GaidenTaskInfo info) { if (info.openLv > modulePlayer.level || info.openLv <= 0) { moduleGlobal.ShowMessage(Util.GetString((int)TextForMatType.NpcGaidenUI, info.openLv > 0 ? 2 : 0, info.openLv)); return; } _currentType = info.taskType; chapterWindow.Initialize(info.taskType); }
private void OnRefreshItem(RectTransform rt, GaidenTaskInfo info) { PropItemInfo pinfo = new PropItemInfo(); pinfo.ID = (int)info.taskType; BaseRestrain.SetRestrainData(rt.gameObject, pinfo, 0, 0); //¶¯Ì¬¸ü»»Í¼Æ¬ Transform t = rt.Find("bg"); UIDynamicImage.LoadImage(t, info.bgIcon, null, true); t = rt.Find("bg/npc"); UIDynamicImage.LoadImage(t, info.icon, null, true); if (info.lampstand.Length > 0) { t = rt.Find("bottom_circle"); UIDynamicImage.LoadImage(t, info.lampstand[0], null, true); } if (info.lampstand.Length > 1) { t = rt.Find("bottom_circle/bottom_bg"); UIDynamicImage.LoadImage(t, info.lampstand[1], null, true); } var text = rt.GetComponent <Text>("bg/chapter/Text"); Util.SetText(text, info.gaidenNameId); //Ó¦ÓÃ×ÖÌåÑÕÉ« if (text && info.nameColor.Length > 0) { text.color = info.nameColor[0]; } //Ó¦ÓÃÃè±ßÑÕÉ« if (info.nameColor.Length > 1) { var outline = text.GetComponent <Outline>(); if (outline) { outline.effectColor = info.nameColor[1]; } var descBg = rt.GetComponent <Image>("bg/chapter/bg"); if (descBg) { descBg.color = info.nameColor[1]; } } text = rt.GetComponent <Text>("bg/white_bg/Text"); Util.SetText(text, info.descId); //Ó¦ÓÃÃèÊö×ÖÌåÑÕÉ« if (text) { text.color = info.descColor; } //ÉèÖüÓËø״̬ var lockState = rt.Find("off"); lockState.SafeSetActive(modulePlayer.level < info.openLv || info.openLv <= 0); text = lockState.GetComponent <Text>("off_bg/Text"); Util.SetText(text, Util.Format(ConfigText.GetDefalutString(TextForMatType.NpcGaidenUI, info.openLv > 0 ? 2 : 0), info.openLv)); }