protected void UpdateBossInfo() { this.EndCountDown(); BossItemInfo bossItemInfo = BossBookManager.Instance.GetBossItemInfo(this.curBossId); if (bossItemInfo == null) { return; } this.SetToggle(bossItemInfo.trackFlag); if (bossItemInfo.survivalBossCount > 0) { this.m_TextRefresh.set_text(GameDataUtils.GetChineseContent(517520, false)); this.m_TextRefreshTime.set_text(bossItemInfo.survivalBossCount.ToString()); } else { this.m_TextRefresh.set_text(GameDataUtils.GetChineseContent(517521, false)); int num = BossBookManager.ToTimeStamp(TimeManager.Instance.PreciseServerTime); int nextRefreshSec = bossItemInfo.nextRefreshSec; if (nextRefreshSec > num) { this.m_TextRefreshTime.set_text(TimeConverter.GetTime(nextRefreshSec - num, TimeFormat.HHMMSS)); this.StratCountDown(); } else { this.m_TextRefresh.set_text(GameDataUtils.GetChineseContent(517520, false)); this.m_TextRefreshTime.set_text(bossItemInfo.survivalBossCount.ToString()); } } }
public void SetSlayLog(int bossId, List <BossKilledLog> logList) { BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossId); ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene); this.m_TextTitle.set_text(GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false) + GameDataUtils.GetChineseContent(517511, false)); this.m_ScrollLayout.set_anchoredPosition(new Vector2(0f, 0f)); this.HideCells(); for (int i = 0; i < logList.get_Count(); i++) { BossKilledLog bossKilledLog = logList.get_Item(i); Transform transform; if (i < this.m_ScrollLayout.get_childCount()) { transform = this.m_ScrollLayout.GetChild(i); transform.get_gameObject().SetActive(true); } else { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("BBSlayRecordCell"); instantiate2Prefab.SetActive(true); transform = instantiate2Prefab.get_transform(); transform.SetParent(this.m_ScrollLayout, false); } DateTime dateTime = BossBookManager.StampToDateTime(bossKilledLog.dateTimeSec.ToString()); string time = TimeConverter.GetTime(dateTime, TimeFormat.MDHHMM); string text = string.Format(GameDataUtils.GetChineseContent(517513, false), time, GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false), bossKilledLog.roleName); transform.Find("TextRecord").GetComponent <Text>().set_text(text); } }
public void SetDropLog(List <BossDropLog> logList) { this.m_TextTitle.set_text(GameDataUtils.GetChineseContent(517512, false)); this.m_ScrollLayout.set_anchoredPosition(new Vector2(0f, 0f)); this.HideCells(); for (int i = 0; i < logList.get_Count(); i++) { BossDropLog bossDropLog = logList.get_Item(i); Transform transform; if (i < this.m_ScrollLayout.get_childCount()) { transform = this.m_ScrollLayout.GetChild(i); transform.get_gameObject().SetActive(true); } else { GameObject instantiate2Prefab = ResourceManager.GetInstantiate2Prefab("BBDropRecordCell"); instantiate2Prefab.SetActive(true); transform = instantiate2Prefab.get_transform(); transform.SetParent(this.m_ScrollLayout, false); } transform.get_gameObject().SetActive(true); BossBiaoQian bossBiaoQian = DataReader <BossBiaoQian> .Get(bossDropLog.labelId); ZhuChengPeiZhi zhuChengPeiZhi = DataReader <ZhuChengPeiZhi> .Get(bossBiaoQian.scene); Text component = transform.Find("TextRecord").GetComponent <Text>(); Text component2 = transform.Find("TextDrop").GetComponent <Text>(); DateTime dateTime = BossBookManager.StampToDateTime(bossDropLog.dateTimeSec.ToString()); string time = TimeConverter.GetTime(dateTime, TimeFormat.MDHHMM); string text = string.Format(GameDataUtils.GetChineseContent(517514, false), new object[] { time, bossDropLog.roleName, GameDataUtils.GetChineseContent(zhuChengPeiZhi.name, false), GameDataUtils.GetChineseContent(bossBiaoQian.nameId, false) }); component.set_text(text); if (bossDropLog.items.get_Count() > 0) { int num = this.GetBestQualityItem(bossDropLog.items); if (num < 0 && num >= bossDropLog.items.get_Count()) { num = 0; } ItemBriefInfo itemBriefInfo = bossDropLog.items.get_Item(num); Items items = DataReader <Items> .Get(itemBriefInfo.cfgId); if (items != null) { component2.set_text(GameDataUtils.GetChineseContent(items.name, false)); Dictionary <string, Color> textColorByQuality = GameDataUtils.GetTextColorByQuality(items.color); component2.set_color(textColorByQuality.get_Item("TextColor")); component2.GetComponent <Outline>().set_effectColor(textColorByQuality.get_Item("TextOutlineColor")); component2.GetComponent <RectTransform>().set_anchoredPosition(new Vector2(component.get_preferredWidth() + 50f, 0f)); } else { component2.set_text(string.Empty); } } else { component2.set_text(string.Empty); } } }