From d99899d37fbf42e3b4f3e877250a9384c4cbc0c4 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 2 Apr 2021 19:06:08 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8D=81=E4=BA=94=E6=97=A5=E7=99=BB?= =?UTF-8?q?=E9=99=86=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FifteenDayGift/FifteenDayGiftPanel.prefab | 152 +++++++++--------- .../FifteenDayGift/FifteenDayGiftPanel.lua | 36 +++-- .../Pokemon/PokemonSingleResultPanel.lua | 37 +++-- .../ManagedResources/~Lua/View/ItemView.lua | 8 +- 4 files changed, 130 insertions(+), 103 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/FifteenDayGift/FifteenDayGiftPanel.prefab b/Assets/ManagedResources/Prefabs/UI/FifteenDayGift/FifteenDayGiftPanel.prefab index 6c84119c47..57243a1aac 100644 --- a/Assets/ManagedResources/Prefabs/UI/FifteenDayGift/FifteenDayGiftPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/FifteenDayGift/FifteenDayGiftPanel.prefab @@ -6321,7 +6321,7 @@ RectTransform: - {fileID: 8747385901818210183} - {fileID: 180175418589611944} - {fileID: 7166992382915912444} - - {fileID: 3226918180300179329} + - {fileID: 7987260822965991062} - {fileID: 5734053510124306292} m_Father: {fileID: 7665699681310612303} m_RootOrder: 1 @@ -8877,81 +8877,6 @@ MonoBehaviour: m_Spacing: {x: 0, y: 0} m_Constraint: 0 m_ConstraintCount: 2 ---- !u!1001 &46921147518872722 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 6698752202692033210} - m_Modifications: - - target: {fileID: 3020818763621735072, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_Name - value: UI_Effect_MianBan_BaiZe_01 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalRotation.x - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalRotation.y - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalRotation.z - value: -0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_RootOrder - value: 7 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: d33b549a44c43724496fea4faaa91bd1, type: 3} ---- !u!4 &3226918180300179329 stripped -Transform: - m_CorrespondingSourceObject: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, - type: 3} - m_PrefabInstance: {fileID: 46921147518872722} - m_PrefabAsset: {fileID: 0} --- !u!1001 &2398800565325074473 PrefabInstance: m_ObjectHideFlags: 0 @@ -9077,6 +9002,81 @@ RectTransform: type: 3} m_PrefabInstance: {fileID: 2398800565325074473} m_PrefabAsset: {fileID: 0} +--- !u!1001 &4807189160824806789 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 6698752202692033210} + m_Modifications: + - target: {fileID: 3020818763621735072, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_Name + value: UI_Effect_MianBan_BaiZe_01 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalRotation.x + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalRotation.y + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: d33b549a44c43724496fea4faaa91bd1, type: 3} +--- !u!4 &7987260822965991062 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 3201745373124766483, guid: d33b549a44c43724496fea4faaa91bd1, + type: 3} + m_PrefabInstance: {fileID: 4807189160824806789} + m_PrefabAsset: {fileID: 0} --- !u!1001 &7375699766067073106 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/FifteenDayGift/FifteenDayGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/FifteenDayGift/FifteenDayGiftPanel.lua index 7a094dd825..a2cc6801f7 100644 --- a/Assets/ManagedResources/~Lua/Modules/FifteenDayGift/FifteenDayGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FifteenDayGift/FifteenDayGiftPanel.lua @@ -40,13 +40,11 @@ function FifteenDayGift:BindEvent() self:ClosePanel() end) Util.AddClick(self.backBtn3,function () - -- self:ClosePanel() - self.effect2:SetActive(true) + self:ClosePanel() end) Util.AddClick(self.btnGet,function () if #frontList == 0 then PopupTipPanel.ShowTip("暂无可领取的奖励~") - self.effect1:SetActive(true) return end NetManager.GetActivityRewardRequest(-1,Data.activityId,function (drop) @@ -56,15 +54,34 @@ function FifteenDayGift:BindEvent() coroutine.wait(0.3) frontList[i]:SetActive(false) backList[i].transform:DORotate(Vector3.New(0, 0, 0), 0.3) - coroutine.wait(0.3) + coroutine.wait(1) end) end - Timer.New(function () + --奖励界面 + local func = function (drop) UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function() FifteenDayGift:Refresh() CheckRedPointStatus(RedPointType.FifteenDayGift_1) end) - end,0.3):Start() + end + Timer.New(function () + --检测奖励是否为灵兽 + if drop.pokemon and #drop.pokemon >= 1 then + local thread=coroutine.start(function() + self.effect2:SetActive(true) + coroutine.wait(4) + self.effect3:SetActive(true) + UIManager.OpenPanel(UIName.PokemonSingleResultPanel,nil,drop,nil,nil,function () + self.effect3:SetActive(false) + self.effect2:SetActive(false) + func(drop) + end) + end) + else + func(drop) + end + end,0.5):Start() + end) end) @@ -97,8 +114,6 @@ end function FifteenDayGift:Refresh() Data = FifteenDayGiftManager.GetData() - self.effect1:SetActive(false) - self.effect2:SetActive(false) CheckRedPointStatus(RedPointType.FifteenDayGift_1) if self.timer then self.timer:Stop() @@ -165,16 +180,13 @@ function FifteenDayGift:SetSingleReward(sData,go,index) end --设置icon 和数量 icon.sprite = SetIcon(sData.Reward[1]) - num.text = string.format("X %s",sData.Reward[2]) + num.text = string.format("× %s",sData.Reward[2]) Util.AddOnceClick(icon.gameObject,function () ItemViewList[index]:OnBtnCkickEvent(sData.Reward[1]) end) end -function FifteenDayGift:PlayEffect() -end - --界面关闭时调用(用于子类重写) function FifteenDayGift:OnClose() if self.timer then diff --git a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua index d45f900a99..6f7e959777 100644 --- a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua @@ -24,6 +24,8 @@ local _heroTable = {} --符合4、5星的英雄容器 local isFree = false local drop = {} +local func + --初始化组件(用于子类重写) function PokemonSingleResultPanel:InitComponent() orginLayer = 0 @@ -79,6 +81,7 @@ function PokemonSingleResultPanel:OnOpen(...) drop = args[2] activityId = args[3] recType = args[4] + func = args[5] _heroTable = drop.pokemon end @@ -139,21 +142,27 @@ function PokemonSingleResultPanel:OnClose() poolManager:UnLoadLive(GetResourcePath(heroStaticData.Live), testLiveGO) end heroStaticData, testLiveGO = nil, nil - if activityId then--限时活动抽卡 - local singleRecruit - local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId) - singleRecruit = array[1] - if type == singleRecruit.Id then - UIManager.OpenPanel(UIName.LingShouBaoGeOneResultPanel, drop,type,activityId,recType) - else - UIManager.OpenPanel(UIName.LingShouBaoGeTenResultPanel, drop,type,activityId,recType) + if type then + if activityId then--限时活动抽卡 + local singleRecruit + local array = ConfigManager.GetAllConfigsDataByKey(ConfigName.LotterySetting,"ActivityId",activityId) + singleRecruit = array[1] + if type == singleRecruit.Id then + UIManager.OpenPanel(UIName.LingShouBaoGeOneResultPanel, drop,type,activityId,recType) + else + UIManager.OpenPanel(UIName.LingShouBaoGeTenResultPanel, drop,type,activityId,recType) + end + else--灵兽山抽卡 + if type == RecruitType.LingShowSingle then + UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type,recType) + else + UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type,recType) + end end - - else--灵兽山抽卡 - if type == RecruitType.LingShowSingle then - UIManager.OpenPanel(UIName.PokemonSummonOneResultPanel, drop,type,recType) - else - UIManager.OpenPanel(UIName.PokemonSummonTenResultPanel, drop,type,recType) + else + if func then + func() + func = nil end end diff --git a/Assets/ManagedResources/~Lua/View/ItemView.lua b/Assets/ManagedResources/~Lua/View/ItemView.lua index 050e26f3fa..38807ceade 100644 --- a/Assets/ManagedResources/~Lua/View/ItemView.lua +++ b/Assets/ManagedResources/~Lua/View/ItemView.lua @@ -318,7 +318,13 @@ function ItemView:GetRewardShow(_itemData, effectLayer) end) elseif _itemData.itemType == 6 then self.num:SetActive(false) - self.name:GetComponent("Text").text = GetCutOutStr(_itemData.name,5) + local str = "" + if _itemData.name and _itemData.name ~= "" then + str = _itemData.name + elseif _itemData.configData then + str = _itemData.configData.Name + end + self.name:GetComponent("Text").text = GetCutOutStr(str,5) -- self.resetLv:GetComponent("Text").text = "+" ..1 self.resetLv:SetActive(false) self.fragmentIcon:SetActive(false)