From bd8fabff5330d81ddfdae1f2110fca028f6247d0 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Tue, 1 Jun 2021 18:04:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E6=AF=8F=E6=97=A5=E7=A4=BC?= =?UTF-8?q?=E5=8C=85=E3=80=91=E5=81=9C=E7=95=99=E7=95=8C=E9=9D=A2=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E5=88=B7=E6=96=B0=EF=BC=8C=E6=98=BE=E7=A4=BA00:00:00?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=88=87=E6=8D=A2=E9=A1=B5=E5=89=8D=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Recharge/View/EveryDayGift.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Recharge/View/EveryDayGift.lua b/Assets/ManagedResources/~Lua/Modules/Recharge/View/EveryDayGift.lua index 393431c339..09a6aabb3b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recharge/View/EveryDayGift.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recharge/View/EveryDayGift.lua @@ -12,12 +12,23 @@ local heroId = 10026 --添加事件监听(用于子类重写) function EveryDayGift:AddListener() - Game.GlobalEvent:AddEvent(GameEvent.FindFairy.RefreshBuyOpenState,self.RefreshData,self) + Game.GlobalEvent:AddEvent(GameEvent.FindFairy.RefreshBuyOpenState,self.RefreshData1,self) end --移除事件监听(用于子类重写) function EveryDayGift:RemoveListener() - Game.GlobalEvent:RemoveEvent(GameEvent.FindFairy.RefreshBuyOpenState,self.RefreshData,self) + Game.GlobalEvent:RemoveEvent(GameEvent.FindFairy.RefreshBuyOpenState,self.RefreshData1,self) +end + +function EveryDayGift:RefreshData1() + local freshTime = 0 + self.shopData = DynamicActivityManager.GetGiftDataByType(self.actConfig.ShopData) + if self.shopData and #self.shopData > 0 then + freshTime = self.shopData[#self.shopData].data.endTime + end + if freshTime - GetTimeStamp() <= 0 then + self:RefreshData(true,true,false) + end end From 61be59d1f388838f0a10ab1572fcd1cce11d86bd Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 1 Jun 2021 18:08:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E3=80=90=E7=A7=B0=E5=8F=B7=E3=80=91?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI_Effect_MianBan_ChengHao_Tslx.prefab | 22 ++++++ .../~Lua/Modules/Setting/SettingInfo.lua | 2 +- .../~Lua/Modules/Setting/SettingPanel.lua | 13 +++- .../Modules/Setting/SettingPlayerTitle.lua | 76 +++++++++++++------ 4 files changed, 88 insertions(+), 25 deletions(-) diff --git a/Assets/ManagedResources/EffectResUI/Chenghao_TaSuiLingXiao/Prefab/UI_Effect_MianBan_ChengHao_Tslx.prefab b/Assets/ManagedResources/EffectResUI/Chenghao_TaSuiLingXiao/Prefab/UI_Effect_MianBan_ChengHao_Tslx.prefab index 06dc06b00c..3ed7cd2c58 100644 --- a/Assets/ManagedResources/EffectResUI/Chenghao_TaSuiLingXiao/Prefab/UI_Effect_MianBan_ChengHao_Tslx.prefab +++ b/Assets/ManagedResources/EffectResUI/Chenghao_TaSuiLingXiao/Prefab/UI_Effect_MianBan_ChengHao_Tslx.prefab @@ -453,6 +453,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 6361193509961736898} + - component: {fileID: 7146534821247858850} m_Layer: 5 m_Name: UI_Effect_MianBan_ChengHao_Tslx m_TagString: Untagged @@ -487,6 +488,27 @@ RectTransform: m_AnchoredPosition: {x: 7, y: 338} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &7146534821247858850 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4163563969343386189} + 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: 0 + m_TargetDisplay: 0 --- !u!1 &4320119772942752865 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Setting/SettingInfo.lua b/Assets/ManagedResources/~Lua/Modules/Setting/SettingInfo.lua index 4193b6bb95..26f7272b0c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Setting/SettingInfo.lua +++ b/Assets/ManagedResources/~Lua/Modules/Setting/SettingInfo.lua @@ -196,7 +196,7 @@ end function SettingInfo:OnSortingOrderChange() -- 头像层级 if this.playerHead then - this.playerHead:SetLayer(self.sortingOrder) + this.playerHead:SetLayer(this.rootPanel.sortingOrder) end end function SettingInfo:OnShowData() diff --git a/Assets/ManagedResources/~Lua/Modules/Setting/SettingPanel.lua b/Assets/ManagedResources/~Lua/Modules/Setting/SettingPanel.lua index a1ebef12b0..58c5695e8d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Setting/SettingPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Setting/SettingPanel.lua @@ -18,9 +18,9 @@ this.contents = { [1] = {view = require("Modules/Setting/SettingInfo"), panelName = "settingInfo"}, --称号 -- [2] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"}, - --时装 + -- 时装 [2] = {view = require("Modules/Setting/SettingPlayerRide"), panelName = "settingPlayerRide"}, - --坐骑 + -- 称号 [3] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"}, --[4] = {view = require("Modules/Setting/SettingPlayerSkin"), panelName = "settingPlayerSkin"}, } @@ -93,6 +93,15 @@ function SettingPanel:OnOpen(index) end end +function SettingPanel:OnSortingOrderChange() + for i = 1, #this.contents do + if this.contents[i].view.OnSortingOrderChange then + this.contents[i].view:OnSortingOrderChange(self.sortingOrder) + end + end + +end + --界面打开或者重新打开后,界面刷新时调用(用于子类重写) -- function SettingPanel:OnShow() diff --git a/Assets/ManagedResources/~Lua/Modules/Setting/SettingPlayerTitle.lua b/Assets/ManagedResources/~Lua/Modules/Setting/SettingPlayerTitle.lua index b330c71706..8fb08a4448 100644 --- a/Assets/ManagedResources/~Lua/Modules/Setting/SettingPlayerTitle.lua +++ b/Assets/ManagedResources/~Lua/Modules/Setting/SettingPlayerTitle.lua @@ -14,8 +14,10 @@ function SettingPlayerTitle:ctor(mainPanel, gameObject) end local titleLive local titleLive2 -local sortingorder = 0 -local sortingorder2 = 0 +local titleLiveCanvas +local titleLiveCanvas2 +local _sortingorder = 0 + local titleLiveStr local titleLiveStr2 local curUserRideId @@ -162,8 +164,6 @@ function this.ShowRideInfo(go,data) end function this.SingleRideClickShowInfo(data,go) - sortingorder=0 - sortingorder2=0 curPlayerHeadIconConfig = data if go then this.setImage:SetActive(true) @@ -203,11 +203,13 @@ function this.SingleRideClickShowInfo(data,go) ride =0, } if titleLive then - poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject) + -- 特效大小修改后无法还原,所以直接删除 + destroy(titleLive) titleLive = nil end if titleLive2 then - poolManager:UnLoadAsset(titleLiveStr2, titleLive2, PoolManager.AssetType.GameObject) + -- 特效大小修改后无法还原,所以直接删除 + destroy(titleLive2) titleLive2 = nil end live2dRoot = PlayerLiveView:New(this.live2dRootParent,2, curPlayerLiveViewData) @@ -221,20 +223,29 @@ function this.SingleRideClickShowInfo(data,go) titleLive.transform:SetParent(this.live2dRootParent.transform) titleLive.transform.localPosition = Vector3.New(0,150,0) titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5) - Util.AddParticleSortLayer(titleLive,this.rootPanel.sortingOrder - sortingorder2) - sortingorder2 = this.rootPanel.sortingOrder - + Util.SetParticleScale(titleLive, 0.5) + Util.AddParticleSortLayer(titleLive, _sortingorder) + titleLiveCanvas = titleLive:GetComponent("Canvas") + if titleLiveCanvas then + titleLiveCanvas.overrideSorting = true + titleLiveCanvas.sortingOrder = _sortingorder + end local curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,data.ItemId) - local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName) - titleLiveStr2 = curArtResourcesConfig.Name - titleLive2 = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject) - titleLive2.transform:SetParent(this.live2dRootParent2.transform) - titleLive2.transform.localPosition = Vector3.New(0,0,0) - titleLive2.transform.localScale = Vector3.New(1,1,1) - Util.AddParticleSortLayer(titleLive2,this.rootPanel.sortingOrder - sortingorder) - sortingorder = this.rootPanel.sortingOrder + local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName) + titleLiveStr2 = curArtResourcesConfig.Name + titleLive2 = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject) + titleLive2.transform:SetParent(this.live2dRootParent2.transform) + titleLive2.transform.localPosition = Vector3.New(0,0,0) + titleLive2.transform.localScale = Vector3.New(1,1,1) + Util.SetParticleScale(titleLive2, 1) + Util.AddParticleSortLayer(titleLive2, _sortingorder) + titleLiveCanvas2 = titleLive2:GetComponent("Canvas") + if titleLiveCanvas2 then + titleLiveCanvas2.overrideSorting = true + titleLiveCanvas2.sortingOrder = _sortingorder + end Util.AddOnceClick(this.goToBtn, function() if not isGet and not isUser then @@ -256,9 +267,27 @@ function this.SingleRideClickShowInfo(data,go) end end) end + +-- 界面层级变动 +function SettingPlayerTitle:OnSortingOrderChange(sortingOrder) + local titleSort = sortingOrder + 10 + if titleLive then + Util.AddParticleSortLayer(titleLive, titleSort - _sortingorder) + end + if titleLive2 then + Util.AddParticleSortLayer(titleLive2, titleSort - _sortingorder) + end + if titleLiveCanvas then + titleLiveCanvas.sortingOrder = titleSort + end + if titleLiveCanvas2 then + titleLiveCanvas2.sortingOrder = titleSort + end + _sortingorder = titleSort +end + --界面关闭时调用(用于子类重写) function SettingPlayerTitle:OnClose() - if live2dRoot then live2dRoot:OnClose() end @@ -269,11 +298,14 @@ end --界面销毁时调用(用于子类重写) function SettingPlayerTitle:OnDestroy() + _sortingorder = 0 this.spLoader:Destroy() - titleLive=nil - titleLive2=nil - titleLiveStr=nil - titleLiveStr2=nil + titleLive=nil + titleLive2=nil + titleLiveCanvas = nil + titleLiveCanvas2 = nil + titleLiveStr=nil + titleLiveStr2=nil end return SettingPlayerTitle \ No newline at end of file From 8ec2d60c3ff7b361ca677cb0d81785d891a2ed23 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Tue, 1 Jun 2021 18:08:40 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90=E7=B2=92=E5=AD=90=E7=89=B9?= =?UTF-8?q?=E6=95=88=E3=80=91=E7=BC=A9=E6=94=BE=E6=8E=A5=E5=8F=A3=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E5=AF=B9gameobject=E8=BF=9B=E8=A1=8C=E7=BC=A9?= =?UTF-8?q?=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/LuaFramework/Scripts/Utility/Util.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Assets/LuaFramework/Scripts/Utility/Util.cs b/Assets/LuaFramework/Scripts/Utility/Util.cs index 788e17df68..9cbb1839ca 100644 --- a/Assets/LuaFramework/Scripts/Utility/Util.cs +++ b/Assets/LuaFramework/Scripts/Utility/Util.cs @@ -901,11 +901,11 @@ namespace GameLogic main.startRotationMultiplier *= scale; } main.startSpeedMultiplier *= scale; - particle.transform.localScale *= scale; + //particle.transform.localScale *= scale; } if (hasParticleObj) { - go.transform.localScale = new Vector3(scale, scale, scale); + //go.transform.localScale = new Vector3(scale, scale, scale); } } From 859bd6679ef1d5f47d93851acd16c9166dc8a2f5 Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Tue, 1 Jun 2021 19:47:54 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=82=B9=E5=B0=86=E5=8F=B010=E8=BF=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E7=BA=A2=E7=82=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Bag/BagManager.lua | 1 + .../~Lua/Modules/Player/RedpotManager.lua | 6 +- .../~Lua/Modules/Recruit/RecruitManager.lua | 57 ++++++++++++++++++- .../~Lua/Modules/Recruit/RecruitPanel.lua | 8 ++- 4 files changed, 65 insertions(+), 7 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua index c7ef08a9d7..f2613574b6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua @@ -101,6 +101,7 @@ function this.BackDataRefreshEnerny(msgItemInfo) end end Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) + CheckRedPointStatus(RedPointType.Recruit_Normal) end end diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index e663b719ac..c4fae8c2ca 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -186,7 +186,7 @@ function this.InitRedPointAllRelate() --秘盒红点 RPData:SetParent(RedPointType.SecretBox_Red1, RedPointType.SecretBox) --角色招募红点 - RPData:SetParent(RedPointType.Recruit_Red, RedPointType.Recruit) + -- RPData:SetParent(RedPointType.Recruit_Red, RedPointType.Recruit) --普通召唤红点 RPData:SetParent(RedPointType.Recruit_Normal, RedPointType.Recruit) -- --运营红点 @@ -383,9 +383,9 @@ function this.RegisterRedCheckFunc() --秘盒红点 RPData:AddCheckFunc(RedPointType.SecretBox_Red1, SecretBoxManager.CheckSecretRedPoint,FUNCTION_OPEN_TYPE.SECRETBOX) --角色招募红点 - RPData:AddCheckFunc(RedPointType.Recruit_Red, RecruitManager.CheckRecuritRedPoint,FUNCTION_OPEN_TYPE.RECURITY) + -- RPData:AddCheckFunc(RedPointType.Recruit_Red, RecruitManager.CheckRecuritRedPoint,FUNCTION_OPEN_TYPE.RECURITY) --普通召唤红点 - RPData:AddCheckFunc(RedPointType.Recruit_Normal, RecruitManager.CheckRecuritNormalPoint,FUNCTION_OPEN_TYPE.RECURITY) + RPData:AddCheckFunc(RedPointType.Recruit_Normal, RecruitManager.GetAllRecruitBtnRedpoint)--RecruitManager.CheckRecuritNormalPoint,FUNCTION_OPEN_TYPE.RECURITY) --七日狂欢红点 RPData:AddCheckFunc(RedPointType.SevenDayCarnival, SevenDayCarnivalManager.GetSevenDayCarnivalRedPoint) --每日首充 diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua index 9a3a6a900e..bf7c412e14 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua @@ -46,13 +46,13 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum) if this.freeUseTimeList[privilegeId] and this.freeUseTimeList[privilegeId] >= 1 then PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1) this.freeUseTimeList[privilegeId] = PrivilegeManager.GetPrivilegeRemainValue(privilegeId) - CheckRedPointStatus(RedPointType.Recruit_Red) - CheckRedPointStatus(RedPointType.Recruit_Normal) + -- CheckRedPointStatus(RedPointType.Recruit_Red) CheckRedPointStatus(RedPointType.TimeLimited) CheckRedPointStatus(RedPointType.QianKunBox) CheckRedPointStatus(RedPointType.Pokemon_Recruit) end end + CheckRedPointStatus(RedPointType.Recruit_Normal) if func then func(msg) end @@ -68,7 +68,7 @@ function this.RefreshFreeTime() this.freeUseTimeList[99] = PrivilegeManager.GetPrivilegeRemainValue(99) this.freeUseTimeList[2005] = PrivilegeManager.GetPrivilegeRemainValue(2005) if (ActTimeCtrlManager.SingleFuncState(1)) then - CheckRedPointStatus(RedPointType.Recruit_Red) + -- CheckRedPointStatus(RedPointType.Recruit_Red) CheckRedPointStatus(RedPointType.Recruit_Normal) CheckRedPointStatus(RedPointType.TimeLimited) CheckRedPointStatus(RedPointType.QianKunBox) @@ -358,6 +358,57 @@ function this.GetExpendDataByCostItem(str,type,LimitNum) return cost end +--抽卡类型 +local rType={ + Normal=1,--普通 + Friend=2,--友情 + Hero=3--神将 +} +--按钮类型 +local bType={ + Btn1=1, + Btn10=2 +} +--抽卡配置 +local preConfigure={ + [1] = {type=RecruitType.NormalSingle,privilegeId=38}, + [2] = {type=RecruitType.NormalTen,privilegeId=38}, + [3] = {type=RecruitType.FriendSingle}, + [4] = {type=RecruitType.FriendTen}, + [5] = {type=RecruitType.Single,privilegeId=14}, + [6] = {type=RecruitType.Ten,privilegeId=14} +} +--点将台红点状态 +function this.GetAllRecruitBtnRedpoint() + for i = 1, #preConfigure do + local redPoint = false + if preConfigure[i].privilegeId then + redPoint = this.GetRecruitBtnRedpoint(preConfigure[i].type,preConfigure[i].privilegeId) + else + redPoint = this.GetRecruitBtnRedpoint(preConfigure[i].type) + end + if redPoint then + return true + end + end + return false +end +--点将台六个按钮各自红点状态 +function this.GetRecruitBtnRedpoint(recruitType,privilegeId)--privilegeId 单抽免费特权次数 + if recruitType == RecruitType.NormalSingle or recruitType == RecruitType.Single then--普通召唤单抽 神将召唤单抽 + if privilegeId then + return PrivilegeManager.GetPrivilegeRemainValue(privilegeId) >= 1 + end + elseif recruitType == RecruitType.FriendTen or recruitType == RecruitType.NormalTen or recruitType == RecruitType.Ten then--所有召唤十连 + local data = RecruitManager.GetExpendData(recruitType) + local itemId = data[1] + local itemNum = data[2] + if BagManager.GetItemCountById(itemId) >= itemNum then + return true + end + end + return false +end return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua index 6e31ca29ae..3e25387bad 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanel.lua @@ -182,7 +182,13 @@ function this.UpdatePanelData() local itemId=0 local itemNum=0 local d=RecruitManager.GetExpendData(m.type) - redPot:SetActive(isFree) + local redPoint = false + if v.privilegeId then + redPoint = RecruitManager.GetRecruitBtnRedpoint(m.type,v.privilegeId) + else + redPoint = RecruitManager.GetRecruitBtnRedpoint(m.type) + end + redPot:SetActive(redPoint) if isFree then --若1按钮有免费次数 后面逻辑不走了 info.text=Language[10489] else