zhangjiannan 2025-05-22 16:28:15 +08:00
parent 42f824de9b
commit 028684e43b
1 changed files with 68 additions and 65 deletions

View File

@ -20,6 +20,7 @@ local orginLayer
local activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig) local activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
local artResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig) local artResourcesConfig = ConfigManager.GetConfig(ConfigName.ArtResourcesConfig)
local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig) local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
local heroNum = 0
local thread = nil --协程 local thread = nil --协程
-- --显示英雄ID -- --显示英雄ID
-- local showHeroIDs = { -- local showHeroIDs = {
@ -114,6 +115,7 @@ function FirstRechargePanel:OnSortingOrderChange()
self.dayRewardList[i]:OnSortingOrderChange(self.sortingOrder) self.dayRewardList[i]:OnSortingOrderChange(self.sortingOrder)
end end
end end
local fun = nil local fun = nil
function FirstRechargePanel:OnOpen(context, _fun) function FirstRechargePanel:OnOpen(context, _fun)
context = context and context or {} context = context and context or {}
@ -150,13 +152,13 @@ function FirstRechargePanel:OnShow()
-- Util.GetGameObject(self.oneLihuiInfo,"name"):GetComponent("Text").text = GetLanguageStrById(this.oneHeroData.ReadingName) -- Util.GetGameObject(self.oneLihuiInfo,"name"):GetComponent("Text").text = GetLanguageStrById(this.oneHeroData.ReadingName)
-- Util.GetGameObject(self.oneLihuiInfo,"pro"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(this.oneHeroData.PropertyName)) -- Util.GetGameObject(self.oneLihuiInfo,"pro"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(this.oneHeroData.PropertyName))
SetHeroData(GetHeroId())
--随机英雄
--thread = coroutine.start(function ()
--for i = 1, 10, 0 do
--SetHeroData(GetHeroId()) --SetHeroData(GetHeroId())
--end --随机英雄
--end) thread = coroutine.start(function()
for i = 1, 10, 0 do
SetHeroData(GetHeroId())
end
end)
end end
function SetHeroData(heroId) function SetHeroData(heroId)
@ -172,7 +174,7 @@ function SetHeroData(heroId)
this.liveNode = LoadHerolive(this.heroData, this.lihui.transform) this.liveNode = LoadHerolive(this.heroData, this.lihui.transform)
--随机英雄 --随机英雄
--[[ if heroNum > 1 then
local stopV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0) local stopV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0)
local startV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0) local startV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0)
local endV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0) local endV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2], 0)
@ -209,8 +211,7 @@ local stopV3 = Vector3.New(this.heroData.Position[1], this.heroData.Position[2],
endV3, endV3,
0.3 0.3
):SetEase(Ease.InQuad) ):SetEase(Ease.InQuad)
]] end
coroutine.wait(0.3) coroutine.wait(0.3)
end end
@ -228,7 +229,7 @@ function GetHeroId()
if showHeroIndex > #showHeroIDs then if showHeroIndex > #showHeroIDs then
showHeroIndex = 1 showHeroIndex = 1
end end
heroNum = #showHeroIDs
return showHeroIDs[showHeroIndex] return showHeroIDs[showHeroIndex]
end end
@ -289,6 +290,7 @@ function FirstRechargePanel:SetTabRedPointStatus(tabIndex)
end end
self.tabRedPoint[tabIndex]:SetActive(redPointStatus) self.tabRedPoint[tabIndex]:SetActive(redPointStatus)
end end
--界面关闭时调用(用于子类重写) --界面关闭时调用(用于子类重写)
function FirstRechargePanel:OnClose() function FirstRechargePanel:OnClose()
if FirstRechargeManager.GetFirstRewardState() then if FirstRechargeManager.GetFirstRewardState() then
@ -318,6 +320,7 @@ function FirstRechargePanel:OnClose()
-- this.Onelive = nil -- this.Onelive = nil
-- end -- end
end end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function FirstRechargePanel:OnDestroy() function FirstRechargePanel:OnDestroy()
if this.liveNode then if this.liveNode then