From bfd2e06ecc229b8aedb5340d5aefdbcfc0dafda5 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Fri, 22 Oct 2021 11:20:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=B3=E5=B0=8A=E9=99=8D=E4=B8=96=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Popup/SupremeHeroPopup.prefab | 96 +++++++++++++++++-- .../~Lua/Modules/Popup/SupremeHeroPopup.lua | 19 ++-- 2 files changed, 99 insertions(+), 16 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/SupremeHeroPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/SupremeHeroPopup.prefab index 55977a24f0..30603a9063 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/SupremeHeroPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/SupremeHeroPopup.prefab @@ -92401,6 +92401,83 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &2133359012923986735 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8819440390954273562} + - component: {fileID: 2334289323025174477} + - component: {fileID: 5822145781662067877} + m_Layer: 5 + m_Name: btnLayer + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8819440390954273562 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2133359012923986735} + 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: + - {fileID: 1485635558825404010} + - {fileID: 1423786620825678682} + m_Father: {fileID: 4878749898380413223} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 1, y: 0.5} + m_AnchorMax: {x: 1, y: 0.5} + m_AnchoredPosition: {x: -245.6, y: 295.58997} + m_SizeDelta: {x: 491.2, y: 349.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &2334289323025174477 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2133359012923986735} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 1 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_AdditionalShaderChannelsFlag: 0 + m_SortingLayerID: 0 + m_SortingOrder: 2 + m_TargetDisplay: 0 +--- !u!114 &5822145781662067877 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2133359012923986735} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 --- !u!1 &2245256078301458680 GameObject: m_ObjectHideFlags: 0 @@ -93391,17 +93468,17 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3099516747955952726} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: - {fileID: 3458161776330785400} - m_Father: {fileID: 4878749898380413223} - m_RootOrder: 9 + m_Father: {fileID: 8819440390954273562} + m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -195, y: 191} + m_AnchoredPosition: {x: -195, y: -104.589966} m_SizeDelta: {x: 390, y: 140} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7809771545927433057 @@ -112995,8 +113072,7 @@ RectTransform: - {fileID: 3061817213645990886} - {fileID: 5340822025078538718} - {fileID: 6882643634657733322} - - {fileID: 1485635558825404010} - - {fileID: 1423786620825678682} + - {fileID: 8819440390954273562} m_Father: {fileID: 1593966968479717942} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -116088,17 +116164,17 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 7779675472010025042} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + 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: - {fileID: 7538222833600628052} - m_Father: {fileID: 4878749898380413223} - m_RootOrder: 8 + m_Father: {fileID: 8819440390954273562} + m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -184, y: 374.16992} + m_AnchoredPosition: {x: -184, y: 78.579956} m_SizeDelta: {x: 368, y: 192} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4142323571919997602 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index 0d0c09e9e5..2d4134a50e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -88,9 +88,10 @@ function SupremeHeroPopup:InitComponent() this.effectRoot3 = Util.GetGameObject(self.gameObject, "Fx_mat_UI_SupremeHeroPopup_changzhu") this.Effect_UI_SupremeHeroPopup_zhuzi = Util.GetGameObject(self.gameObject, "Panel/Effect_UI_SupremeHeroPopup_zhuzi") this.LoadLive2D() - this.tianjingzunzhe = Util.GetGameObject(self.gameObject, "Panel/Middle/tianjingzunzhe") + this.btnLayer = Util.GetGameObject(self.gameObject, "Panel/Middle/btnLayer"):GetComponent("Canvas") + this.tianjingzunzhe = Util.GetGameObject(this.btnLayer.transform, "tianjingzunzhe") this.tianjingzunzheRed = Util.GetGameObject(this.tianjingzunzhe, "red") - this.lingxiaobaojian = Util.GetGameObject(self.gameObject, "Panel/Middle/lingxiaobaojian") + this.lingxiaobaojian = Util.GetGameObject(this.btnLayer.transform, "lingxiaobaojian") this.lingxiaobaojianRed = Util.GetGameObject(this.lingxiaobaojian, "red") --1玉帝 2御剑 @@ -146,6 +147,8 @@ function SupremeHeroPopup:OnSortingOrderChange() Util.SetParticleSortLayer(this.panelist[i].Fx_mat_UI_SupremeHeroPopup_renwuchuxian, layer + 1) Util.SetParticleSortLayer(this.panelist[i].Fx_mat_UI_SupremeHeroPopup_changzhu, layer + 1) end + this.btnLayer.overrideSorting = true + this.btnLayer.sortingOrder = layer + 1 end --绑定事件(用于子类重写) @@ -317,17 +320,21 @@ function this.SetMissionData() this.RewardList[j].go.gameObject:SetActive(true) local dataConfig = activityConfig[idList[curPage][j].id] this.RewardList[j].title.text = GetLanguageStrById(dataConfig.ContentsShow) - if dataConfig.ExtraParm == 0 then + --if dataConfig.ExtraParm == 0 then + if dataConfig.ExtraParm and dataConfig.ExtraParm[1] and dataConfig.ExtraParm[1] == 0 then Log(string.format("ActivityRewardConfig表中ID为%s对应的ExtraParm项数据为空", idList[curPage][j].id)) Log("请检查表或者重新导表!") return end - local itemId = dataConfig.ExtraParm + -- local itemId = dataConfig.ExtraParm + -- local itemnum = 1 + local itemId = dataConfig.ExtraParm[1] + local itemnum = dataConfig.ExtraParm[2] or 0 if not this.itemList[j] then this.itemList[j] = SubUIManager.Open(SubUIConfig.ItemView, this.RewardList[j].frame.transform) end - this.itemList[j]:OnOpen(false, {itemId, 0}, 0.92) - + this.itemList[j]:OnOpen(false, {itemId, itemnum}, 0.92) + this.itemList[j].num.gameObject:SetActive(itemnum > 1) this.RefreshItemData(j,idList[curPage][j].id) Util.AddOnceClick(this.RewardList[j].Btn,function() idList[curPage][j].jumpevent()