新英雄上阵修改提交

dev_chengFeng
wangzhenxing 2023-04-18 15:34:22 +08:00
parent 2f17b7af58
commit 5999c18900
2 changed files with 15 additions and 14 deletions

View File

@ -125,6 +125,7 @@ function this:InitComponent()
--筛选按钮 --筛选按钮
for i = 0, 5 do for i = 0, 5 do
tabs[i] = Util.GetGameObject(this.gameObject, "Tabs/Grid/Btn" .. i) tabs[i] = Util.GetGameObject(this.gameObject, "Tabs/Grid/Btn" .. i)
tabs[i]:SetActive(true)
if tabsImg[i + 1] then if tabsImg[i + 1] then
Util.GetGameObject(tabs[i], "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(tabsImg[i + 1]) Util.GetGameObject(tabs[i], "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(tabsImg[i + 1])
end end
@ -853,13 +854,13 @@ function this.SingleHeroDataShow(_go, _heroData)
else else
redPot.gameObject:SetActive(false) redPot.gameObject:SetActive(false)
end end
if _heroData.property then -- if _heroData.property then
changeProBtn:SetActive(_heroData.property>=5) -- changeProBtn:SetActive(_heroData.property>=5)
pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.property)) -- pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.property))
else -- else
changeProBtn:SetActive(false) changeProBtn:SetActive(false)
pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName)) pro.sprite= this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
end --end
icon.sprite=this.spLoader:LoadSprite(heroData.icon) icon.sprite=this.spLoader:LoadSprite(heroData.icon)
local level=heroData.lv local level=heroData.lv
pos.sprite = this.spLoader:LoadSprite(heroData.professionIcon) pos.sprite = this.spLoader:LoadSprite(heroData.professionIcon)
@ -1001,13 +1002,13 @@ function this.SingleHeroDataShow(_go, _heroData)
end end
-- 点击事件 -- 点击事件
Util.AddOnceClick(go, function() Util.AddOnceClick(go, function()
if heroData.property and heroData.property>=5 then -- if heroData.property and heroData.property>=5 then
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ChangeHeroPro,heroData,function() -- UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ChangeHeroPro,heroData,function()
LogError("刷新界面数据") -- LogError("刷新界面数据")
this.RefreshShow(false,false) -- this.RefreshShow(false,false)
end) -- end)
return -- return
end -- end
-- 判断是上阵还是下阵 -- 判断是上阵还是下阵
local formationAction = FORMATION_ACTION.UP local formationAction = FORMATION_ACTION.UP
for k, v in ipairs(this.choosedList) do for k, v in ipairs(this.choosedList) do

View File

@ -32,7 +32,7 @@ function this:InitComponent(gameObject)
this.selectBtn=Util.GetGameObject(gameObject, "Tabs/selectBtn") this.selectBtn=Util.GetGameObject(gameObject, "Tabs/selectBtn")
this.hintTxt=Util.GetGameObject(gameObject, "tipTxt") this.hintTxt=Util.GetGameObject(gameObject, "tipTxt")
this.btns={} this.btns={}
for i = 1, 4 do for i = 1, 5 do
this.btns[i]=Util.GetGameObject(gameObject, "Tabs/grid/Btn"..i) this.btns[i]=Util.GetGameObject(gameObject, "Tabs/grid/Btn"..i)
end end
@ -48,7 +48,7 @@ function this:BindEvent()
Util.AddClick(this.cancelBtn,function() Util.AddClick(this.cancelBtn,function()
parent:ClosePanel() parent:ClosePanel()
end) end)
for i = 1, 4 do for i = 1, 5 do
Util.AddClick(this.btns[i], function() Util.AddClick(this.btns[i], function()
if i == curProId then if i == curProId then
return return