Merge branch 'china/dev-c' of http://60.1.1.230/gaoxin/JL_Client into china/dev-c

dev_chengFeng
jiaoyangna 2021-06-01 20:22:30 +08:00
commit b2a71d4f8c
31 changed files with 223 additions and 35 deletions

View File

@ -901,11 +901,11 @@ namespace GameLogic
main.startRotationMultiplier *= scale; main.startRotationMultiplier *= scale;
} }
main.startSpeedMultiplier *= scale; main.startSpeedMultiplier *= scale;
particle.transform.localScale *= scale; //particle.transform.localScale *= scale;
} }
if (hasParticleObj) if (hasParticleObj)
{ {
go.transform.localScale = new Vector3(scale, scale, scale); //go.transform.localScale = new Vector3(scale, scale, scale);
} }
} }

View File

@ -453,6 +453,7 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 6361193509961736898} - component: {fileID: 6361193509961736898}
- component: {fileID: 7146534821247858850}
m_Layer: 5 m_Layer: 5
m_Name: UI_Effect_MianBan_ChengHao_Tslx m_Name: UI_Effect_MianBan_ChengHao_Tslx
m_TagString: Untagged m_TagString: Untagged
@ -487,6 +488,27 @@ RectTransform:
m_AnchoredPosition: {x: 7, y: 338} m_AnchoredPosition: {x: 7, y: 338}
m_SizeDelta: {x: 100, y: 100} m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5} 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 --- !u!1 &4320119772942752865
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -101,6 +101,7 @@ function this.BackDataRefreshEnerny(msgItemInfo)
end end
end end
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
CheckRedPointStatus(RedPointType.Recruit_Normal)
end end
end end
@ -1097,6 +1098,7 @@ function this.BagIndicationRefresh(msg)
--检测背包红点 --检测背包红点
CheckRedPointStatus(RedPointType.Bag_HeroDebris) CheckRedPointStatus(RedPointType.Bag_HeroDebris)
CheckRedPointStatus(RedPointType.Bag_BoxAndBlueprint) CheckRedPointStatus(RedPointType.Bag_BoxAndBlueprint)
CheckRedPointStatus(RedPointType.Recruit_Normal)
-- 超出最大数量限制提示 -- 超出最大数量限制提示
if msg.isMax and msg.isMax == 1 then if msg.isMax and msg.isMax == 1 then

View File

@ -145,6 +145,9 @@ end
function this:OnSortingOrderChange() function this:OnSortingOrderChange()
orginLayer = self.sortingOrder orginLayer = self.sortingOrder
for k,v in pairs(subViewList) do
v.sub:OnSortingOrderChange(self.sortingOrder)
end
end end
----==========================一级页签相关=========================================== ----==========================一级页签相关===========================================
-- tab按钮自定义显示设置 -- tab按钮自定义显示设置

View File

@ -90,6 +90,9 @@ function LingShouBaoGe:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function LingShouBaoGe:OnSortingOrderChange()
end
function LingShouBaoGe:OnShow(_sortingOrder) function LingShouBaoGe:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)
sortingOrder = _sortingOrder sortingOrder = _sortingOrder

View File

@ -54,6 +54,9 @@ function LingShowTeHui:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function LingShowTeHui:OnSortingOrderChange()
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function LingShowTeHui:OnShow(_sortingOrder,_parent) function LingShowTeHui:OnShow(_sortingOrder,_parent)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -85,6 +85,9 @@ function QianKunBox:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function QianKunBox:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function QianKunBox:OnShow(_sortingOrder) function QianKunBox:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -182,6 +182,9 @@ function SheJiDaDian:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function SheJiDaDian:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function SheJiDaDian:OnShow(_sortingOrder) function SheJiDaDian:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -66,6 +66,9 @@ function ShengYiTianJiang:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function ShengYiTianJiang:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function ShengYiTianJiang:OnShow(_sortingOrder) function ShengYiTianJiang:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -120,6 +120,9 @@ function TimeLimitUpHero:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function TimeLimitUpHero:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function TimeLimitUpHero:OnShow(_sortingOrder) function TimeLimitUpHero:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -90,6 +90,9 @@ function TimeLimitedCall:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function TimeLimitedCall:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function TimeLimitedCall:OnShow(_sortingOrder) function TimeLimitedCall:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -82,6 +82,9 @@ function XiangYaoDuoBao:BindEvent()
end) end)
end end
function XiangYaoDuoBao:OnSortingOrderChange()
end
function XiangYaoDuoBao:OnShow(_sortingOrder,_parent) function XiangYaoDuoBao:OnShow(_sortingOrder,_parent)
local actId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XiangYaoDuoBao) local actId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XiangYaoDuoBao)
if not actId or actId <= 0 then return end if not actId or actId <= 0 then return end

View File

@ -111,6 +111,9 @@ function XinJiangLaiXi:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function XinJiangLaiXi:OnSortingOrderChange()
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function XinJiangLaiXi:OnShow(_sortingOrder,_parent) function XinJiangLaiXi:OnShow(_sortingOrder,_parent)
local actId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XinJiangLaiXi) local actId = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.XinJiangLaiXi)

View File

@ -83,6 +83,9 @@ function YiJingBaoKu:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function YiJingBaoKu:OnSortingOrderChange()
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function YiJingBaoKu:OnShow(_sortingOrder) function YiJingBaoKu:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -61,6 +61,9 @@ function CommonActPage:OnOpen(_activityConfig,_index,parent)
PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..self.actConfig.ActiveType,1) PlayerPrefs.SetInt(PlayerManager.uid.."CommonActPage"..self.actConfig.ActiveType,1)
end end
function CommonActPage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function CommonActPage:OnShow(_sortingOrder) function CommonActPage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -64,6 +64,9 @@ function ConRechargePage:OnOpen(_activityConfig,_index,parent)
self.gameObject.name = "ConRechargePage"..self.actConfig.Id self.gameObject.name = "ConRechargePage"..self.actConfig.Id
end end
function ConRechargePage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function ConRechargePage:OnShow(_sortingOrder) function ConRechargePage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -71,6 +71,9 @@ function ExChangePage:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function ExChangePage:OnSortingOrderChange()
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function ExChangePage:OnShow(_sortingOrder) function ExChangePage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -59,6 +59,9 @@ function ExpertPage:OnOpen(_activityConfig,_index,parent)
self.gameObject.name = "ExpertPage"..self.actConfig.Id self.gameObject.name = "ExpertPage"..self.actConfig.Id
end end
function ExpertPage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function ExpertPage:OnShow(_sortingOrder) function ExpertPage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -94,6 +94,9 @@ function CumulativeSignInPage:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function CumulativeSignInPage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function CumulativeSignInPage:OnShow(_sortingOrder) function CumulativeSignInPage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -67,6 +67,9 @@ function GrowthGiftPage:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function GrowthGiftPage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function GrowthGiftPage:OnShow(_sortingOrder) function GrowthGiftPage:OnShow(_sortingOrder)
VipManager.SetGrowthPackagePointStatus()--成长礼包 VipManager.SetGrowthPackagePointStatus()--成长礼包

View File

@ -81,6 +81,9 @@ function MonthCardPage:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function MonthCardPage:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function MonthCardPage:OnShow(_sortingOrder) function MonthCardPage:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -109,6 +109,9 @@ function UpperMonthCard:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function UpperMonthCard:OnSortingOrderChange()
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function UpperMonthCard:OnShow(_sortingOrder) function UpperMonthCard:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -185,7 +185,7 @@ function this.InitRedPointAllRelate()
--秘盒红点 --秘盒红点
RPData:SetParent(RedPointType.SecretBox_Red1, RedPointType.SecretBox) 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) RPData:SetParent(RedPointType.Recruit_Normal, RedPointType.Recruit)
-- --运营红点 -- --运营红点
@ -382,9 +382,9 @@ function this.RegisterRedCheckFunc()
--秘盒红点 --秘盒红点
RPData:AddCheckFunc(RedPointType.SecretBox_Red1, SecretBoxManager.CheckSecretRedPoint,FUNCTION_OPEN_TYPE.SECRETBOX) 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) RPData:AddCheckFunc(RedPointType.SevenDayCarnival, SevenDayCarnivalManager.GetSevenDayCarnivalRedPoint)
--每日首充 --每日首充

View File

@ -104,6 +104,11 @@ function EveryDayGift:OnOpen(_activityConfig,_index,parent)
self.gameObject.name = "EveryDayGift"..self.actConfig.Id self.gameObject.name = "EveryDayGift"..self.actConfig.Id
end end
function EveryDayGift:OnSortingOrderChange(_sortingOrder)
Util.SetParticleSortLayer(self.UI_Effect_jinkuang_Yuan, _sortingOrder+1)
self.sortingOrder = _sortingOrder
end
-- 打开,重新打开时回调 -- 打开,重新打开时回调
function EveryDayGift:OnShow(_sortingOrder) function EveryDayGift:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)

View File

@ -57,6 +57,9 @@ function RechargeView:OnOpen(_activityConfig,_index,parent)
self.parent = parent self.parent = parent
end end
function RechargeView:OnSortingOrderChange()
end
function RechargeView:OnShow(_sortingOrder) function RechargeView:OnShow(_sortingOrder)
self.gameObject:SetActive(true) self.gameObject:SetActive(true)
self.sortingOrder = _sortingOrder self.sortingOrder = _sortingOrder

View File

@ -46,13 +46,13 @@ function this.RecruitRequest(recruitType, func, privilegeId,_itemId,_itemNum)
if this.freeUseTimeList[privilegeId] and this.freeUseTimeList[privilegeId] >= 1 then if this.freeUseTimeList[privilegeId] and this.freeUseTimeList[privilegeId] >= 1 then
PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1) PrivilegeManager.RefreshPrivilegeUsedTimes(privilegeId, 1)
this.freeUseTimeList[privilegeId] = PrivilegeManager.GetPrivilegeRemainValue(privilegeId) this.freeUseTimeList[privilegeId] = PrivilegeManager.GetPrivilegeRemainValue(privilegeId)
CheckRedPointStatus(RedPointType.Recruit_Red) -- CheckRedPointStatus(RedPointType.Recruit_Red)
CheckRedPointStatus(RedPointType.Recruit_Normal)
CheckRedPointStatus(RedPointType.TimeLimited) CheckRedPointStatus(RedPointType.TimeLimited)
CheckRedPointStatus(RedPointType.QianKunBox) CheckRedPointStatus(RedPointType.QianKunBox)
CheckRedPointStatus(RedPointType.Pokemon_Recruit) CheckRedPointStatus(RedPointType.Pokemon_Recruit)
end end
end end
CheckRedPointStatus(RedPointType.Recruit_Normal)
if func then if func then
func(msg) func(msg)
end end
@ -68,7 +68,7 @@ function this.RefreshFreeTime()
this.freeUseTimeList[99] = PrivilegeManager.GetPrivilegeRemainValue(99) this.freeUseTimeList[99] = PrivilegeManager.GetPrivilegeRemainValue(99)
this.freeUseTimeList[2005] = PrivilegeManager.GetPrivilegeRemainValue(2005) this.freeUseTimeList[2005] = PrivilegeManager.GetPrivilegeRemainValue(2005)
if (ActTimeCtrlManager.SingleFuncState(1)) then if (ActTimeCtrlManager.SingleFuncState(1)) then
CheckRedPointStatus(RedPointType.Recruit_Red) -- CheckRedPointStatus(RedPointType.Recruit_Red)
CheckRedPointStatus(RedPointType.Recruit_Normal) CheckRedPointStatus(RedPointType.Recruit_Normal)
CheckRedPointStatus(RedPointType.TimeLimited) CheckRedPointStatus(RedPointType.TimeLimited)
CheckRedPointStatus(RedPointType.QianKunBox) CheckRedPointStatus(RedPointType.QianKunBox)
@ -358,6 +358,57 @@ function this.GetExpendDataByCostItem(str,type,LimitNum)
return cost return cost
end 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 itemId ~= 16 and BagManager.GetItemCountById(itemId) >= itemNum then--itemId ~= 16 妖精不算
return true
end
end
return false
end
return this return this

View File

@ -182,7 +182,13 @@ function this.UpdatePanelData()
local itemId=0 local itemId=0
local itemNum=0 local itemNum=0
local d=RecruitManager.GetExpendData(m.type) 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按钮有免费次数 后面逻辑不走了 if isFree then --若1按钮有免费次数 后面逻辑不走了
info.text=Language[10489] info.text=Language[10489]
else else

View File

@ -196,7 +196,7 @@ end
function SettingInfo:OnSortingOrderChange() function SettingInfo:OnSortingOrderChange()
-- 头像层级 -- 头像层级
if this.playerHead then if this.playerHead then
this.playerHead:SetLayer(self.sortingOrder) this.playerHead:SetLayer(this.rootPanel.sortingOrder)
end end
end end
function SettingInfo:OnShowData() function SettingInfo:OnShowData()

View File

@ -18,9 +18,9 @@ this.contents = {
[1] = {view = require("Modules/Setting/SettingInfo"), panelName = "settingInfo"}, [1] = {view = require("Modules/Setting/SettingInfo"), panelName = "settingInfo"},
--称号 --称号
-- [2] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"}, -- [2] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"},
--时装 -- 时装
[2] = {view = require("Modules/Setting/SettingPlayerRide"), panelName = "settingPlayerRide"}, [2] = {view = require("Modules/Setting/SettingPlayerRide"), panelName = "settingPlayerRide"},
--坐骑 -- 称号
[3] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"}, [3] = {view = require("Modules/Setting/SettingPlayerTitle"), panelName = "settingPlayerTitle"},
--[4] = {view = require("Modules/Setting/SettingPlayerSkin"), panelName = "settingPlayerSkin"}, --[4] = {view = require("Modules/Setting/SettingPlayerSkin"), panelName = "settingPlayerSkin"},
} }
@ -93,6 +93,15 @@ function SettingPanel:OnOpen(index)
end end
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() -- function SettingPanel:OnShow()

View File

@ -14,8 +14,10 @@ function SettingPlayerTitle:ctor(mainPanel, gameObject)
end end
local titleLive local titleLive
local titleLive2 local titleLive2
local sortingorder = 0 local titleLiveCanvas
local sortingorder2 = 0 local titleLiveCanvas2
local _sortingorder = 0
local titleLiveStr local titleLiveStr
local titleLiveStr2 local titleLiveStr2
local curUserRideId local curUserRideId
@ -162,8 +164,6 @@ function this.ShowRideInfo(go,data)
end end
function this.SingleRideClickShowInfo(data,go) function this.SingleRideClickShowInfo(data,go)
sortingorder=0
sortingorder2=0
curPlayerHeadIconConfig = data curPlayerHeadIconConfig = data
if go then if go then
this.setImage:SetActive(true) this.setImage:SetActive(true)
@ -203,11 +203,13 @@ function this.SingleRideClickShowInfo(data,go)
ride =0, ride =0,
} }
if titleLive then if titleLive then
poolManager:UnLoadAsset(titleLiveStr, titleLive, PoolManager.AssetType.GameObject) -- 特效大小修改后无法还原,所以直接删除
destroy(titleLive)
titleLive = nil titleLive = nil
end end
if titleLive2 then if titleLive2 then
poolManager:UnLoadAsset(titleLiveStr2, titleLive2, PoolManager.AssetType.GameObject) -- 特效大小修改后无法还原,所以直接删除
destroy(titleLive2)
titleLive2 = nil titleLive2 = nil
end end
live2dRoot = PlayerLiveView:New(this.live2dRootParent,2, curPlayerLiveViewData) live2dRoot = PlayerLiveView:New(this.live2dRootParent,2, curPlayerLiveViewData)
@ -221,20 +223,29 @@ function this.SingleRideClickShowInfo(data,go)
titleLive.transform:SetParent(this.live2dRootParent.transform) titleLive.transform:SetParent(this.live2dRootParent.transform)
titleLive.transform.localPosition = Vector3.New(0,150,0) titleLive.transform.localPosition = Vector3.New(0,150,0)
titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5) titleLive.transform.localScale = Vector3.New(0.5,0.5,0.5)
Util.AddParticleSortLayer(titleLive,this.rootPanel.sortingOrder - sortingorder2) Util.SetParticleScale(titleLive, 0.5)
sortingorder2 = this.rootPanel.sortingOrder 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 curPlayerRole = ConfigManager.GetConfigData(ConfigName.PlayerRole,data.ItemId)
local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName) local curArtResourcesConfig = ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,curPlayerRole.LiveAnimName)
titleLiveStr2 = curArtResourcesConfig.Name titleLiveStr2 = curArtResourcesConfig.Name
titleLive2 = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject) titleLive2 = poolManager:LoadAsset(titleLiveStr, PoolManager.AssetType.GameObject)
titleLive2.transform:SetParent(this.live2dRootParent2.transform) titleLive2.transform:SetParent(this.live2dRootParent2.transform)
titleLive2.transform.localPosition = Vector3.New(0,0,0) titleLive2.transform.localPosition = Vector3.New(0,0,0)
titleLive2.transform.localScale = Vector3.New(1,1,1) titleLive2.transform.localScale = Vector3.New(1,1,1)
Util.AddParticleSortLayer(titleLive2,this.rootPanel.sortingOrder - sortingorder) Util.SetParticleScale(titleLive2, 1)
sortingorder = this.rootPanel.sortingOrder Util.AddParticleSortLayer(titleLive2, _sortingorder)
titleLiveCanvas2 = titleLive2:GetComponent("Canvas")
if titleLiveCanvas2 then
titleLiveCanvas2.overrideSorting = true
titleLiveCanvas2.sortingOrder = _sortingorder
end
Util.AddOnceClick(this.goToBtn, function() Util.AddOnceClick(this.goToBtn, function()
if not isGet and not isUser then if not isGet and not isUser then
@ -256,9 +267,27 @@ function this.SingleRideClickShowInfo(data,go)
end end
end) 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() function SettingPlayerTitle:OnClose()
if live2dRoot then if live2dRoot then
live2dRoot:OnClose() live2dRoot:OnClose()
end end
@ -269,11 +298,14 @@ end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function SettingPlayerTitle:OnDestroy() function SettingPlayerTitle:OnDestroy()
_sortingorder = 0
this.spLoader:Destroy() this.spLoader:Destroy()
titleLive=nil titleLive=nil
titleLive2=nil titleLive2=nil
titleLiveStr=nil titleLiveCanvas = nil
titleLiveStr2=nil titleLiveCanvas2 = nil
titleLiveStr=nil
titleLiveStr2=nil
end end
return SettingPlayerTitle return SettingPlayerTitle

View File

@ -127,7 +127,8 @@ function ShopViewNew:RemoveListener()
Game.GlobalEvent:RemoveEvent(GameEvent.Shop.RefreshItem,RefreshData,self) Game.GlobalEvent:RemoveEvent(GameEvent.Shop.RefreshItem,RefreshData,self)
end end
function ShopViewNew:OnSortingOrderChange()
end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function ShopViewNew:OnOpen(_activityConfig,_index,parent) function ShopViewNew:OnOpen(_activityConfig,_index,parent)