public void SetHeroHeadSlotInfo(cmd_match_room_hero_slot _data) { //int LSelectBtnGroupLength = this.TLFrame.GetMember("LHeroPortraitBtnGroupLength"); //Value tmpTopFrame = _data.nSlotIndex / LSelectBtnGroupLength < 1 ? TLFrame : TRFrame; if (!Value.IsValueValid(TFrame)) { return; } int LSelectBtnGroupLength = TFrame.GetMember("LHeroPortraitBtnGroupLength"); int SlotIndex = _data.nSlotIndex % LSelectBtnGroupLength; bool bIsLock = Convert.ToBoolean(_data.bIsLock); if (TFrame.Invoke("ChangeHeroBtn", SlotIndex, _data.nHeroID, bIsLock, false, _data.szHeroTooltip) == null) { Trace.LogError("call ChangeHeroBtn failded"); return; } HeroPortraitTable.Add(_data.nSlotIndex, _data.nHeroID); }
private void SetHeroHeadSlot() { //HeroPortraitTable.Clear(); if (!Value.IsValueValid(TFrame)) { return; } for (int i = 0; i < PlayerLoginData.playercnt; i++) { int pID = (int)PlayerLoginData.players[i].pid; if (TFrame.Invoke("ChangeHeroBtn", i, pID, PlayerLoginData.players[i].heroid, false, false, "") == null) { Trace.LogError("call ChangeHeroBtn failded"); return; } if (!HeroPortraitTable.Contains(i)) { HeroPortraitTable.Add(i, PlayerLoginData.players[i].skinid); } } }