From 7efdfd50293b84475f3ab6053d0c73efa77fad08 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 9 Nov 2021 18:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=C2=B7=E8=A3=85=E5=A4=87?= =?UTF-8?q?=E3=80=91=E5=A2=9E=E5=8A=A0=E6=88=98=E5=8A=9B=E5=AF=B9=E6=AF=94?= =?UTF-8?q?=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Popup/RewardEquipSingleShowPopup2.prefab | 87 +++++++++++++++++-- .../Popup/RewardEquipSingleShowPopup2.lua | 19 ++++ .../~Lua/Modules/RoleInfo/RoleEquipPanel.lua | 2 +- 3 files changed, 101 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup2.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup2.prefab index e694e2f72e..07b139d9d2 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup2.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup2.prefab @@ -501,6 +501,80 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &1254291321149931646 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5348054937984066563} + - component: {fileID: 5904884511611882461} + - component: {fileID: 16585192353849437} + m_Layer: 5 + m_Name: powerUPorDown + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5348054937984066563 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254291321149931646} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 5509733079217669299} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 107, y: 36} + m_SizeDelta: {x: 48, y: 58} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5904884511611882461 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254291321149931646} + m_CullTransparentMesh: 0 +--- !u!114 &16585192353849437 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1254291321149931646} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: 815bda8d665a55e4f86ca556c75ae8b0, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 --- !u!1 &1300421713178413199 GameObject: m_ObjectHideFlags: 0 @@ -2697,8 +2771,8 @@ RectTransform: m_Father: {fileID: 6594472603124481167} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 442.9, y: 0} m_SizeDelta: {x: 825.8, y: 0} m_Pivot: {x: 0.5, y: 1} @@ -2777,6 +2851,7 @@ RectTransform: - {fileID: 8541552412634871263} - {fileID: 465399823903699223} - {fileID: 7686199749489823501} + - {fileID: 5348054937984066563} - {fileID: 4898254141833732587} m_Father: {fileID: 5981932543035177726} m_RootOrder: 0 @@ -3012,9 +3087,9 @@ RectTransform: m_Father: {fileID: 5981932543035177726} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 460, y: -385} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 460, y: 0} m_SizeDelta: {x: 905, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &5201084322800259043 @@ -4540,7 +4615,7 @@ PrefabInstance: - target: {fileID: 2317469752420294965, guid: 6e21988006c4b0942b32c75e6b6987ba, type: 3} propertyPath: m_RootOrder - value: 9 + value: 10 objectReference: {fileID: 0} - target: {fileID: 2317469752420294965, guid: 6e21988006c4b0942b32c75e6b6987ba, type: 3} diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua index 33c20516cf..dd1dc06577 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup2.lua @@ -26,6 +26,7 @@ function RewardEquipSingleShowPopup2:InitComponent() self.equipInfoText=Util.GetGameObject(self.topBar, "equipInfoText"):GetComponent("Text") self.powerNum=Util.GetGameObject(self.topBar, "powerNum"):GetComponent("Text") self.star=Util.GetGameObject(self.topBar, "star") + self.powerNumUpDown = Util.GetGameObject(self.topBar, "powerUPorDown"):GetComponent("Image") self.effectbaijin = Util.GetGameObject(self.topBar, "fx_zhuangbeijiemian") --装备属性--midBar --basePro @@ -163,6 +164,9 @@ function RewardEquipSingleShowPopup2:OnOpen(_parent,_equipData,_openType,_isShow self.curHeroData = _curHeroData --装备了该装备的英雄数据 self.position = _position --装备的位置 self.nextEquip = _targetEquipData--要替换的目标装备 + if _targetEquipData then + LogGreen("Id:"..tostring(_equipData.id).." Id2:"..tostring(_targetEquipData.id)) + end self.isShowGo = _isShowGo and _isShowGo or false--是否显示跳转按钮 self.func = _func end @@ -194,6 +198,21 @@ function RewardEquipSingleShowPopup2:OnShow() --下部按钮信息 self.effectbaijin:SetActive(equipConfigData.Quality==7) Util.SetParticleSortLayer(self.effectbaijin,self.sortingOrder + 1) + if self.openType == 4 then + self.powerNumUpDown.gameObject:SetActive(true) + local Power = EquipManager.CalculateWarForce(self.equipData.id) + local Power2 = EquipManager.CalculateWarForce(self.nextEquip.id) + LogGreen("Id:"..tostring(self.equipData.id).."Power:"..tostring(Power).." Id2:"..tostring(self.equipData.id).."Power2:"..tostring(Power2)) + if(Power > Power2) then + self.powerNumUpDown.sprite = self.spLoader:LoadSprite(PowerChangeIconDef[1]) + elseif(Power < Power2)then + self.powerNumUpDown.sprite = self.spLoader:LoadSprite(PowerChangeIconDef[2]) + else + self.powerNumUpDown.gameObject:SetActive(false) + end + else + self.powerNumUpDown.gameObject:SetActive(false) + end --basePro基础属性 if equipConfigData.Property then diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua index 9370caceeb..1c5dd7e1ff 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua @@ -842,7 +842,7 @@ function this.SingleItemDataShow(_go, _itemData) end Util.AddOnceClick(Util.GetGameObject(_go.transform, "mask"),function() if curHeroEquipDatas[equipConfig[_itemData.id].Position] then - local nextEquipData = EquipManager.GetSingleEquipData(_itemData.id) + local nextEquipData = curHeroEquipDatas[equipConfig[_itemData.id].Position] if curHeroData.harmonyGongMing then this:OpenTips(nextEquipData,equipConfig[_itemData.id].Position) else