特训选择英雄修改提交
parent
5210074f75
commit
8e4636f8de
|
@ -8,6 +8,7 @@ local this=TrainSelectHeroPanel
|
||||||
local buildData=nil
|
local buildData=nil
|
||||||
local curHeroId=nil
|
local curHeroId=nil
|
||||||
local leftTime=-1
|
local leftTime=-1
|
||||||
|
local curSelectObj=nil
|
||||||
function this:InitComponent()
|
function this:InitComponent()
|
||||||
self.spLoader = SpriteLoader.New()
|
self.spLoader = SpriteLoader.New()
|
||||||
self.btn_close = Util.GetGameObject(self.gameObject,"bg/btn_close")
|
self.btn_close = Util.GetGameObject(self.gameObject,"bg/btn_close")
|
||||||
|
@ -179,6 +180,7 @@ end
|
||||||
function this:SetHeroList(isTop,isAni)
|
function this:SetHeroList(isTop,isAni)
|
||||||
local heroList = TrainBuildManager.GetAllCanTrainHero()
|
local heroList = TrainBuildManager.GetAllCanTrainHero()
|
||||||
local list={}
|
local list={}
|
||||||
|
curSelectObj=nil
|
||||||
--LogError("buildData.heroId======="..buildData.heroId)
|
--LogError("buildData.heroId======="..buildData.heroId)
|
||||||
local upList=TrainBuildManager.GetTrainHeroIds()
|
local upList=TrainBuildManager.GetTrainHeroIds()
|
||||||
for k, v in pairs(heroList) do
|
for k, v in pairs(heroList) do
|
||||||
|
@ -225,7 +227,7 @@ function this:SetTime(_text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local curSelectObj=nil
|
|
||||||
function this:ShowSingleHero(go,data,index)
|
function this:ShowSingleHero(go,data,index)
|
||||||
local heroData = data.heroConfig
|
local heroData = data.heroConfig
|
||||||
Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Natural))
|
Util.GetGameObject(go, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.Natural))
|
||||||
|
|
Loading…
Reference in New Issue