【心愿抽卡】完成
parent
37e854190b
commit
7d366000be
|
|
@ -82,6 +82,7 @@ function this:SetUpHero()
|
|||
proIcon.gameObject:SetActive(true)
|
||||
starGrid:SetActive(true)
|
||||
choosed:SetActive(false)
|
||||
icon.gameObject:SetActive(true)
|
||||
if heroId > 0 then
|
||||
local heroData = heroConfig[heroId]
|
||||
frame.sprite = self.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.Quality,heroData.Star))
|
||||
|
|
@ -103,7 +104,7 @@ function this:SetUpHero()
|
|||
frame.gameObject:SetActive(false)
|
||||
proIcon.gameObject:SetActive(false)
|
||||
starGrid:SetActive(false)
|
||||
icon.sprite = self.spLoader:LoadSprite("lingshou_jiahao")
|
||||
icon.gameObject:SetActive(false)
|
||||
Util.AddOnceClick(go,function ()
|
||||
self.curSelect = RecruitManager.CheckIndex()
|
||||
this:Refresh(false,false)
|
||||
|
|
@ -151,6 +152,11 @@ function this:ShowSingleHero(go,data,index)
|
|||
this:Refresh(false,false)
|
||||
end)--英雄变更:1增加、2卸下
|
||||
end)
|
||||
elseif value == 4 then--上方存在自己,但已经出过该英雄了
|
||||
self.maskList[self.curSelect][index]:SetActive(true)
|
||||
Util.AddOnceClick(go,function ()
|
||||
PopupTipPanel.ShowTip("同系神将每日只可选择一位获取一次概率提升~")
|
||||
end)
|
||||
elseif value == 3 then--可选
|
||||
Util.AddOnceClick(go,function ()
|
||||
RecruitManager.ChangeHero(1,data.Reward[1],function ()
|
||||
|
|
|
|||
|
|
@ -461,7 +461,11 @@ function this.CheckCurHeroState(_heroTid)
|
|||
for i = 1, #this.WishCardData do
|
||||
if this.WishCardData[i].heroTid == _heroTid then
|
||||
--如果上方存在自己就✔
|
||||
return 1
|
||||
if this.WishCardData[i].status == 0 then
|
||||
return 1
|
||||
elseif this.WishCardData[i].status == 1 then
|
||||
return 4
|
||||
end
|
||||
end
|
||||
end
|
||||
for i = 1, #this.WishCardData do
|
||||
|
|
@ -485,6 +489,7 @@ function this.CheckCurHeroState(_heroTid)
|
|||
return 3
|
||||
end
|
||||
|
||||
--添加和卸下神将
|
||||
function this.ChangeHero(type,_heroTid,func)
|
||||
if type == 1 then --增加神将
|
||||
for i = 1, #this.WishCardData do
|
||||
|
|
@ -508,8 +513,8 @@ function this.ChangeHero(type,_heroTid,func)
|
|||
end)
|
||||
end
|
||||
|
||||
--检查该跳转的页签
|
||||
function this.CheckIndex()
|
||||
|
||||
local num = 0
|
||||
for i = 1, #this.WishCardData do
|
||||
if this.WishCardData[i].heroTid > 0 then
|
||||
|
|
@ -519,7 +524,6 @@ function this.CheckIndex()
|
|||
if num == 3 then
|
||||
return 1
|
||||
end
|
||||
|
||||
local num2 = {1,2,3,4}
|
||||
for i = 4, 1,-1 do
|
||||
for j = 1, #this.WishCardData do
|
||||
|
|
|
|||
Loading…
Reference in New Issue