【战斗】casting层级调整,失败界面打开1秒后才能关闭

dev_chengFeng
gaoxin 2021-03-26 12:15:48 +08:00
parent cb15f601b3
commit b18ad8487a
2 changed files with 7 additions and 2 deletions

View File

@ -180,7 +180,7 @@ function this:OnSortingOrderChange(battleSorting)
this.FirstEffect:GetComponent("Canvas").sortingOrder = battleSorting + 30
this.skillEffectRoot:GetComponent("Canvas").sortingOrder = battleSorting + 40
local skillSorting = battleSorting + 300
local skillSorting = battleSorting + 90
this.mySkillCast:GetComponent("Canvas").sortingOrder = skillSorting
this.enemySkillCast:GetComponent("Canvas").sortingOrder = skillSorting

View File

@ -17,8 +17,12 @@ end
--绑定事件(用于子类重写)
function BattleFailPopup:BindEvent()
Util.AddClick(this.btnClose, function ()
-- 三秒后才能关闭
if GetTimeStamp() - this.openTime < 1 then
return
end
this.ClosePanelRefreshData()
if m_battlePanel then
m_battlePanel:ClosePanel()
@ -70,6 +74,7 @@ end
--界面打开时调用(用于子类重写)
function BattleFailPopup:OnOpen(battlePanel, showRecord, backPanel,_fightType)
this.openTime = GetTimeStamp()
LogGreen("isBackBattle = false")
isBackBattle = false
if battlePanel then