From b0650bbb20a7e3d0550f7345d97749515414b016 Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Thu, 21 Sep 2023 16:41:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=BB=E8=A7=92=E7=A4=BC=E7=89=A9?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/RoleGift/PlayerGiftPanel.prefab | 6 +++--- .../~Lua/Modules/RoleInfo/PlayerGiftPanel.lua | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleGift/PlayerGiftPanel.prefab b/Assets/ManagedResources/Prefabs/UI/RoleGift/PlayerGiftPanel.prefab index 067c4b76d6..0b4d7a3b3e 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleGift/PlayerGiftPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleGift/PlayerGiftPanel.prefab @@ -21053,8 +21053,8 @@ RectTransform: 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: 0.8, y: 248.5} - m_SizeDelta: {x: 950.7, y: 929} + m_AnchoredPosition: {x: 0.8, y: 319.5} + m_SizeDelta: {x: 950.7, y: 787} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4292312059031958145 CanvasRenderer: @@ -21544,7 +21544,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: 522, y: -419.79} + m_AnchoredPosition: {x: 522, y: -419.79004} m_SizeDelta: {x: 6, y: -1310.1} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5083175378485869623 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua index 4d3b210d65..dc011983d6 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/PlayerGiftPanel.lua @@ -171,6 +171,10 @@ function this.RefreshWindowData() data.id=list[i] data.type=2 data.qua=itemConfig[list[i]].Quantity + if equipConfig[data.id] then + collectNum=collectNum + equipConfig[data.id].Gift + LogError("equipConfig[data.id].Gift=="..equipConfig[data.id].Gift) + end table.insert(allUpIds,data.id) end table.insert(giftDatas,data) @@ -224,9 +228,6 @@ function this.SingleUpItemShow(_go,data) local add=Util.GetGameObject(_go,"add") if data.id and data.id~=0 then frame.sprite=this.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[data.id].Quantity)) - if equipConfig[data.id] then - collectNum=collectNum+equipConfig[data.id].Gift - end icon.gameObject:SetActive(true) name.gameObject:SetActive(true) add:SetActive(false) From 4ca900993226fa4717ac236f3afcd65d6d36fbb1 Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Thu, 21 Sep 2023 17:13:03 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=80=8D=E9=81=A5=E6=B8=B8=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua index 0d5bb7c1fc..bd222177ae 100644 --- a/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/XiaoYao/XiaoYaoMapPanel.lua @@ -21,6 +21,7 @@ local bossNum=0 local isPlayMove=0 local targetBtn local costNum --每次摇骰子消耗道具数量 +local isRuning=false local saiziImage={"x_xiaoyaoyou_saizi_01","x_xiaoyaoyou_saizi_02","x_xiaoyaoyou_saizi_03","x_xiaoyaoyou_saizi_04","x_xiaoyaoyou_saizi_05","x_xiaoyaoyou_saizi_06"} --初始化组件(用于子类重写) function this:InitComponent() @@ -88,7 +89,11 @@ function this:BindEvent() Util.AddClick(this.addItmBtn, function () UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.XiaoYaoYouItemExchange,98) end) - Util.AddClick(this.btn_shop, function () + Util.AddClick(this.btn_shop, function () + if isRuning then + PopupTipPanel.ShowTip("移动中,无法跳转商店") + return + end JumpManager.GoJump(40081) end) Util.AddClick(this.btnBack, function () @@ -196,6 +201,7 @@ end ---播放骰子动效 function this.PlaySaiziAnim(_data) + isRuning=true this.startBtn:GetComponent("Button").enabled=false Log("当前骰子数:"..#_data.pointes) -- 骰子音效 @@ -266,7 +272,8 @@ function this.MoveTT(targetIndex,_data) Log("待机动画") -- this.SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) this.liveNode:SetWalkDir(WALK_DIR.IDLE_FRONT) - this.startBtn:GetComponent("Button").enabled=true + this.startBtn:GetComponent("Button").enabled=true + isRuning=false this.EventTrigger(_data) if curGridIndex>=#allGridData then this.StopAuto() @@ -695,6 +702,7 @@ function this:OnShow() isAutoRun=false isPlayMove=0 this.startBtn:GetComponent("Button").enabled=true + isRuning=false isAuto=XiaoYaoManager.isAutoYouli this.toggle.gameObject:SetActive(isAuto) end @@ -719,9 +727,6 @@ function this:OnClose() -- poolManager:UnLoadLive(npc, this.liveNode) -- this.liveNode = nil -- end - if this.liveNode then - this.liveNode:OnClose() - end if this.timer then this.timer:Stop() this.timer = nil @@ -740,6 +745,9 @@ function this:OnDestroy() eventTimer:Stop() eventTimer = nil end + if this.liveNode then + this.liveNode:OnClose() + end if this.liveNode then poolManager:UnLoadLive(npc, this.liveNode) this.liveNode = nil