public void RefreshUIByWearingInfo(WearEquipInfo wearingInfo, int depthValue = 3000) { this.DepthValue = depthValue; this.ItemID = wearingInfo.id; this.IsWearing = false; this.HaveEquipObjVisibility = true; this.NoEquipObjVisibility = false; this.BtnReplaceVisibility = false; this.BtnStrengthVisibility = false; this.CurrentEquipIconVisibility = false; this.SetEquipItemData(this.ItemID, wearingInfo.lv); this.SetFightingData((long)EquipmentManager.Instance.GetEquipFightingByExcellentAttrs(this.ItemID, wearingInfo.excellentAttrs)); this.SetExcellentAttrsData(wearingInfo.excellentAttrs); if (wearingInfo != null && wearingInfo.excellentAttrs != null) { int num = 0; for (int i = 0; i < wearingInfo.excellentAttrs.get_Count(); i++) { if (wearingInfo.excellentAttrs.get_Item(i).color >= 1f) { num++; } } this.SetEquipIconFXByGogokNum(num, this.ItemID); } }
public void ShowEquipItem(WearEquipInfo equipData) { if (!this.isInit) { this.InitUI(); } if (equipData == null) { return; } this.ItemID = equipData.id; this.EquipData = equipData; this.EquipType = equipData.type; Items items = DataReader <Items> .Get(this.ItemID); if (items == null) { return; } this.ResetEquipPartText(); ResourceManager.SetSprite(this.m_frameImg, GameDataUtils.GetItemFrameByColor(items.color)); ResourceManager.SetSprite(this.m_iconImg, GameDataUtils.GetIcon(items.icon)); if (equipData.lv > 0) { this.m_levelText.set_text("Lv." + equipData.lv); } this.m_itemStepText.set_text(string.Format(GameDataUtils.GetChineseContent(505023, false), items.step)); int num = 0; for (int i = 0; i < equipData.excellentAttrs.get_Count(); i++) { if (equipData.excellentAttrs.get_Item(i).color >= 1f) { num++; } } base.FindTransform("ExcellentAttrIconList").FindChild("Image1").GetComponent <Image>().set_enabled(num >= 1); base.FindTransform("ExcellentAttrIconList").FindChild("Image2").GetComponent <Image>().set_enabled(num >= 2); base.FindTransform("ExcellentAttrIconList").FindChild("Image3").GetComponent <Image>().set_enabled(num >= 3); Transform transform = this.m_iconImg.get_transform(); EquipGlobal.GetEquipIconFX(equipData.id, num, transform, "RoleShowItem", 2000, false); }
private void SetEquipItem(WearEquipInfo wearEquipInfo) { if (wearEquipInfo == null) { return; } if (this.equipPartDic.ContainsKey((EquipLibType.ELT)wearEquipInfo.type)) { Transform transform = this.equipPartDic.get_Item((EquipLibType.ELT)wearEquipInfo.type); if (transform.get_childCount() > 0) { Item2RoleShow component = transform.GetChild(0).GetComponent <Item2RoleShow>(); if (component == null) { return; } component.ShowEquipItem(wearEquipInfo); } } }
public void RefreshUI(WearEquipInfo equipData, int depthValue = 3000) { if (equipData == null) { return; } EquipItemTipUI component = this.rightTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); if (component != null) { component.RefreshUIByWearingInfo(equipData, depthValue); } zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(equipData.id); if (zZhuangBeiPeiZhiBiao != null) { EquipLibType.ELT pos = (EquipLibType.ELT)zZhuangBeiPeiZhiBiao.position; EquipItemTipUI component2 = this.leftTipTrans.FindChild("EquipItemTipUI").GetComponent <EquipItemTipUI>(); EquipLib equipLib = EquipmentManager.Instance.equipmentData.equipLibs.Find((EquipLib a) => a.type == pos); component2.RefreshUIByEquipID(equipLib.wearingId, depthValue); } }
public static void ShowEquipItem(int itemId, WearEquipInfo equipData, Transform root = null) { int depthValue = 3000; if (root == null) { root = UINodesManager.MiddleUIRoot; } else { Canvas componentInParent = root.GetComponentInParent <Canvas>(); if (componentInParent != null) { depthValue = componentInParent.get_sortingOrder(); } } if (BackpackManager.Instance.GetItem(itemId) == null) { return; } EquipCompareTipUI equipCompareTipUI = UIManagerControl.Instance.OpenUI("EquipCompareTipUI", root, false, UIType.NonPush) as EquipCompareTipUI; equipCompareTipUI.RefreshUI(equipData, depthValue); }