【优化】抽将动画可以点击跳过 2

dev_chengFeng
zhangqiang 2021-01-27 17:19:27 +08:00
parent 54e4b78be8
commit bae3ec50cd
1 changed files with 8 additions and 5 deletions

View File

@ -51,6 +51,7 @@ function SingleRecruitPanel:InitComponent()
this.UI_Effect_choukaSR = Util.GetGameObject(self.transform, "bg/UI_Effect_chouka_SR")
this.UI_Effect_choukaR = Util.GetGameObject(self.transform, "bg/UI_Effect_chouka_R")
this.jumpBtn = Util.GetGameObject(this.jumpPanel.transform, "btnContinue/jumpBtn")
this.jumpBtnGo = Util.GetGameObject(this.jumpPanel.transform, "btnContinue")
self.posImage=Util.GetGameObject(self.transform,"Pos/PosImage"):GetComponent("Image")
self.posText=Util.GetGameObject(self.transform,"Pos/PosText"):GetComponent("Text")
@ -122,6 +123,10 @@ function SingleRecruitPanel:BindEvent()
if state==1 then --单抽
this.UI_Effect_open:SetActive(false)
self:UpdataPanelData(heroData)
this.goBtn:SetActive(false)
this.againBtn:SetActive(true)
this.sureBtn:SetActive(true)
this.info:SetActive(false)
else
if lotterySetting[type].LotteryType == 11 then
isFirst=false
@ -129,6 +134,7 @@ function SingleRecruitPanel:BindEvent()
self:ClosePanel()
UIManager.OpenPanel(UIName.TenRecruitPanel,heroData,type,recruitType)
end
this.jumpBtnGo:SetActive(false)
end)
--确定按钮
Util.AddClick(self.goBtn,function()
@ -188,14 +194,13 @@ function SingleRecruitPanel:OnShow()
isFirst=true
maxTimesId=lotterySetting[type].MaxTimes --特权上限ID
index=0
this.jumpBtnGo:SetActive(true)
if state==1 then --单抽
this.jumpBtn:SetActive(true)
if lotterySetting[type].LotteryType == 11 then
isFirst=false
end
self:TenOpenPanel()
elseif state==2 then
this.jumpBtn:SetActive(true)
isFirst=true
if lotterySetting[type].LotteryType == 11 then
isFirst=false
@ -356,21 +361,19 @@ function SingleRecruitPanel:UpdataPanelData(_heroData)
--10连
if state == 2 then
-- self:TenOpenPanel(heroData)
this.jumpBtn:SetActive(true)
Util.GetGameObject(self.transform, "rolePanel/rolePanel2"):SetActive(true)
this.sureBtn:SetActive(false)
this.againBtn:SetActive(false)
this.goBtn:SetActive(true)
else
this.goBtn:SetActive(heroStaticData.Star == 5 or heroStaticData.Star == 4)
this.jumpBtn:SetActive(false)
this.sureBtn:SetActive(heroStaticData.Star ~= 5 and heroStaticData.Star ~= 4)
this.againBtn:SetActive(heroStaticData.Star ~= 5 and heroStaticData.Star ~= 4)
Util.GetGameObject(self.transform, "rolePanel/rolePanel2"):SetActive(true)
if heroStaticData.Quality == 5 and heroStaticData.Natural >= 13 then
HeroManager.DetectionOpenFiveStarActivity(heroStaticData.Star)
end
this.jumpBtnGo:SetActive(false)
end
end