抽卡修改提交

wangzhenxing 2020-10-28 18:07:06 +09:00
parent afed2cad3b
commit 4bcd3abe86
2 changed files with 43 additions and 32 deletions

View File

@ -89,40 +89,41 @@ function PokemonSingleResultPanel:OnShow()
this:TenOpenPanel()
end
function PokemonSingleResultPanel:TenOpenPanel()
if _heroTable and #_heroTable > 0 and _heroTable[index] then
if isFirst then --第一次进来
this.UI_Effect_open:SetActive(true)
index = 1
timeNum3=0
timeNum=1.3
timeNum2=4.3
else--以后每次进来
this.UI_Effect_open:SetActive(false)
timeNum3=2
timeNum=0
timeNum2=0
end
if isFirst then
this.rolePanel:SetActive(false)
Timer.New(function ()
this.UI_Effect_choukaSSR:SetActive(false)
this.UI_Effect_choukaSR:SetActive(false)
this.UI_Effect_choukaR:SetActive(false)
this.UI_Effect_appear:SetActive(true)
SoundManager.PlaySound(SoundConfig.Sound_Recruit2)
end, timeNum):Start()
Timer.New(function ()
this.UI_Effect_open:SetActive(false)
end, 4):Start()
end
if isFirst then --第一次进来
this.UI_Effect_open:SetActive(true)
index = 1
timeNum3=0
timeNum=1.3
timeNum2=4.3
else--以后每次进来
this.UI_Effect_open:SetActive(false)
timeNum3=2
timeNum=0
timeNum2=0
end
if isFirst then
this.rolePanel:SetActive(false)
Timer.New(function ()
this.UI_Effect_choukaSSR:SetActive(false)
this.UI_Effect_choukaSR:SetActive(false)
this.UI_Effect_choukaR:SetActive(false)
this.UI_Effect_appear:SetActive(true)
SoundManager.PlaySound(SoundConfig.Sound_Recruit2)
end, timeNum):Start()
Timer.New(function ()
this.UI_Effect_open:SetActive(false)
end, 4):Start()
end
Timer.New(function ()
if _heroTable and #_heroTable > 0 and _heroTable[index] then
this:UpdataPanelData(_heroTable[index])
isFirst = false
index = index + 1
end, timeNum2):Start()
else
self:ClosePanel()
end
else
self:ClosePanel()
end
end, timeNum2):Start()
end
function PokemonSingleResultPanel:UpdataPanelData(_heroData)
@ -137,7 +138,9 @@ function PokemonSingleResultPanel:UpdataPanelData(_heroData)
this.UI_Effect_appear:SetActive(false)
SoundManager.PlaySound(SoundConfig.Sound_Recruit3)
--不同星级开启不同特效
this.UI_Effect_choukaSSR:SetActive(true)
this.UI_Effect_choukaSSR:SetActive(heroStaticData.Quality == 5)
this.UI_Effect_choukaSR:SetActive(heroStaticData.Quality == 4)
this.UI_Effect_choukaR:SetActive(heroStaticData.Quality == 3 or heroStaticData.Quality == 2 or heroStaticData.Quality == 1)
--TODO:动态加载立绘
testLiveGO = poolManager:LoadLive(GetResourcePath(heroStaticData.Live), self.live2dRoot.transform,
Vector3.one * heroStaticData.Scale, Vector3.New(heroStaticData.Position[1],heroStaticData.Position[2],0))

View File

@ -273,7 +273,7 @@ function PokemonSummonPanel:OnSortingOrderChange(_sortingOrder)
orginLayer = _sortingOrder
end
function PokemonSummonPanel:OnHide()
function PokemonSummonPanel:OnClose()
self.gameObject:SetActive(false)
self.detail.gameObject:SetActive(false)
if self.timer then
@ -292,6 +292,14 @@ end
--界面销毁时调用(用于子类重写)
function PokemonSummonPanel:OnDestroy()
SubUIManager.Close(self.upView)
if self.timer then
self.timer:Stop()
self.timer = nil
end
if self.timer2 then
self.timer2:Stop()
self.timer2 = nil
end
end
return PokemonSummonPanel