diff --git a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua index ea72083b08..813b212434 100644 --- a/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HomeLand/TrainSelectHeroPanel.lua @@ -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))