| | |
| | | |
| | | equipImage.SetOrgSprite(equip.config.IconKey); |
| | | itemName.text = UIHelper.AppendColor(equip.config.ItemColor, equip.config.ItemName, true, 1); |
| | | qualityName.text = UIHelper.GetQualityNameWithColor(equip.config.ItemColor, Language.Get("equipQualityFormat")); |
| | | qualityName.text = UIHelper.GetQualityNameWithColor(equip.config.ItemColor, Language.Get("L1039")); |
| | | itemNameOutline.OutlineColor = UIHelper.GetUIOutlineColor(equip.config.ItemColor); |
| | | qualityNameOutline.OutlineColor = UIHelper.GetUIOutlineColor(equip.config.ItemColor); |
| | | placeName.text = EquipModel.Instance.GetEquipPlaceName(equip.config.EquipPlace); |
| | |
| | | |
| | | if (showFightPower < 0) |
| | | { |
| | | fightPowerNum.text = UIHelper.AppendColor(TextColType.Red, $"-{UIHelper.ReplaceLargeNum(showFightPower)}", false); |
| | | fightPowerNum.text = UIHelper.AppendColor(TextColType.Red, $"-{UIHelper.ReplaceLargeNum(Math.Abs(showFightPower))}", false); |
| | | cmpResult = 2; |
| | | } |
| | | else |
| | | { |
| | | cmpResult = showFightPower > 0 ? 1 : 0; |
| | | fightPowerNum.text = UIHelper.AppendColor(TextColType.Green, $"+{UIHelper.ReplaceLargeNum(showFightPower)}", false); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //先缩小,这样不会因为间隔帧产生明显的闪烁 |
| | | uieffect.transform.localScale = Vector3.zero; |
| | | ShowAttrState(isNewEquip); |
| | | RefreshEffect(equip).Forget(); |
| | | } |
| | |
| | | //延迟处理特效大小 |
| | | async UniTask RefreshEffect(ItemModel equip) |
| | | { |
| | | await UniTask.DelayFrame(5); |
| | | await UniTask.DelayFrame(3); |
| | | int effectID = EquipModel.Instance.equipUIEffects[Math.Min(equip.config.ItemColor, EquipModel.Instance.equipUIEffects.Length) - 1]; |
| | | if (effectID == 0) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | uieffect.Stop(); |
| | | uieffect.effectId = effectID; |
| | | //计算高度缩放比例 特效显示依赖rect的排版 |
| | | uieffect.transform.localScale = new Vector3(0.98f, bgRect.rect.height / uieffect.GetComponent<RectTransform>().rect.height, 1); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |