public static void ShowWorldBossList(GC_WORLDBOSS_TEAMLIST msg) { WorldBossList.Clear(); //... WorldBossCurPage = msg.Curpage; WorldBossTotalPage = msg.Totalpage; for (int i = 0; i < msg.teamIdCount; i++) { WorldBossList.Add(new WorldBossTeamInfo( msg.GetTeamId(i), msg.GetLeadername(i), msg.GetScore(i), msg.GetPos(i), msg.GetCd(i), msg.GetSceneClassId(i), msg.GetSceneInstId(i))); } if (WorldBossWindow.Instance() != null) { CallShowWorldBossList(); } else { if (IsClickWorldBossUI == 1) { IsClickWorldBossUI = 0; UIManager.ShowUI(UIInfo.WorldBossWindowRoot, OnShowWorldBossMemberRoot); } } }
public void SetData(WorldBossWindow parent, HuaShanPVPData.WorldBossTeamInfo data) { m_data = data; m_parent = parent; LabelName.text = StrDictionary.GetClientDictionaryString("#{2113}", data.name); CountdownCD = data.cd / 1000; LabelScore.text = data.score.ToString(); LabelScene.text = TableManager.GetSceneClassByID(data.sceneid, 0).Name + data.instid.ToString(); int tempPos = data.pos; if (tempPos <= 3) { m_PosLabel.gameObject.SetActive(false); m_PosSprite.gameObject.SetActive(true); } else { m_PosLabel.gameObject.SetActive(true); m_PosSprite.gameObject.SetActive(false); } if (tempPos == 1) { m_PosSprite.spriteName = "Icon-Rank01"; } else if (tempPos == 2) { m_PosSprite.spriteName = "Icon-Rank02"; } else if (tempPos == 3) { m_PosSprite.spriteName = "Icon-Rank03"; } else { m_PosLabel.text = data.pos.ToString(); } //m_ProgressSlider.value = data.per/10000.0f; if (CountdownCD == 0) { LabelCd.text = "";//TT7972 Utils.GetDicByID(1993); m_fightButton.SetActive(IsCanActiveFightButton()); } else { m_fightButton.SetActive(false); LabelCd.text = "";//TT7972 StrDictionary.GetClientDictionaryString("#{1994}", CountdownCD); } }
public static WorldBossListItem CreateItem(GameObject grid, GameObject resItem, string name, WorldBossWindow parent, HuaShanPVPData.WorldBossTeamInfo data) { if (grid != null && resItem != null) { GameObject curItem = Utils.BindObjToParent(resItem, grid, name); if (null != curItem) { WorldBossListItem curItemComponent = curItem.GetComponent <WorldBossListItem>(); if (null != curItemComponent) { curItemComponent.SetData(parent, data); } return(curItemComponent); } } return(null); }