From 4bcd3abe862d07197aacb8eec91609d5354a3c9e Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 28 Oct 2020 18:07:06 +0900 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=8D=A1=E4=BF=AE=E6=94=B9=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pokemon/PokemonSingleResultPanel.lua | 65 ++++++++++--------- .../Modules/Pokemon/PokemonSummonPanel.lua | 10 ++- 2 files changed, 43 insertions(+), 32 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua index 9cd3beaa5d..41988a5ca3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSingleResultPanel.lua @@ -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)) diff --git a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonPanel.lua b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonPanel.lua index a2ea7ba05f..7d3bdb4c8c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Pokemon/PokemonSummonPanel.lua @@ -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 \ No newline at end of file