特训选择英雄修改提交

wangzhenxing 2023-11-28 14:29:02 +08:00
parent 5210074f75
commit 8e4636f8de
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ local this=TrainSelectHeroPanel
local buildData=nil
local curHeroId=nil
local leftTime=-1
local curSelectObj=nil
function this:InitComponent()
self.spLoader = SpriteLoader.New()
self.btn_close = Util.GetGameObject(self.gameObject,"bg/btn_close")
@ -179,6 +180,7 @@ end
function this:SetHeroList(isTop,isAni)
local heroList = TrainBuildManager.GetAllCanTrainHero()
local list={}
curSelectObj=nil
--LogError("buildData.heroId======="..buildData.heroId)
local upList=TrainBuildManager.GetTrainHeroIds()
for k, v in pairs(heroList) do
@ -225,7 +227,7 @@ function this:SetTime(_text)
end
local curSelectObj=nil
function this:ShowSingleHero(go,data,index)
local heroData = data.heroConfig
Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Natural))