抛弹竞猜结束 打开 ATM_GuessTipView时机修改

dev_chengFeng
zhangqiang 2020-07-11 17:16:14 +08:00
parent 28f2a1c4f4
commit 4edc074ca3
3 changed files with 10 additions and 5 deletions

View File

@ -135,6 +135,7 @@ end
--界面关闭时调用(用于子类重写) --界面关闭时调用(用于子类重写)
function ArenaResultPopup:OnClose() function ArenaResultPopup:OnClose()
if fun then if fun then
LogRed("抛弹竞猜结束 打开 ATM_GuessTipView")
fun() fun()
fun = nil fun = nil
end end

View File

@ -716,10 +716,10 @@ end
function this.GetTwoOutOfThreeInfo(type) function this.GetTwoOutOfThreeInfo(type)
local oldTwoOutOfThreeIndex = nil---历史记录(上次的结果 当前胜负根据战斗结果判断) 1 无记录 0前两场负 1 前两场胜 2 胜 3 负 4 胜负 5 负胜 local oldTwoOutOfThreeIndex = nil---历史记录(上次的结果 当前胜负根据战斗结果判断) 1 无记录 0前两场负 1 前两场胜 2 胜 3 负 4 胜负 5 负胜
local curBattleResult = nil--当前胜负 -1 未开始 0 负 1 胜 local curBattleResult = nil--当前胜负 -1 未开始 0 负 1 胜
if type == 1 then--我的 if type == TOP_MATCH_STAGE.CHOOSE then--我的
oldTwoOutOfThreeIndex = this.GetBaseData().process oldTwoOutOfThreeIndex = this.GetBaseData().process
curBattleResult = this.GetBattleInfo().result curBattleResult = this.GetBattleInfo().result
elseif type == 2 then--竞猜 elseif type == TOP_MATCH_STAGE.ELIMINATION then--竞猜
oldTwoOutOfThreeIndex = this.GetProcess() oldTwoOutOfThreeIndex = this.GetProcess()
curBattleResult = this.GetBetBattleInfo().result curBattleResult = this.GetBetBattleInfo().result
end end

View File

@ -109,7 +109,7 @@ function this.battleDetailBtnClick(isShowTip)
arg.red.head = betBattleInfo.enemyInfo.head arg.red.head = betBattleInfo.enemyInfo.head
arg.red.frame = betBattleInfo.enemyInfo.headFrame arg.red.frame = betBattleInfo.enemyInfo.headFrame
UIManager.OpenPanel(UIName.ArenaResultPopup, arg,function() UIManager.OpenPanel(UIName.ArenaResultPopup, arg,function()
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessDataUpdate) Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnGuessDataUpdateShowTip)
end) end)
end) end)
end end
@ -184,7 +184,7 @@ function ATM_GuessView:OnOpen(...)
-- this.timer = Timer.New(_TimeUpdate, 1 , -1, true) -- this.timer = Timer.New(_TimeUpdate, 1 , -1, true)
-- this.timer:Start() -- this.timer:Start()
-- end -- end
this.RefreshGuessTipView() -- this.RefreshGuessTipView()
end end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写) --界面打开或者重新打开后,界面刷新时调用(用于子类重写)
@ -277,8 +277,12 @@ function this.RefreshGuessTipView()
local IsBeted = myBetTarget and myBetTarget ~= 0 local IsBeted = myBetTarget and myBetTarget ~= 0
local isShow = ArenaTopMatchManager.GetcurIsShowDoGuessPopup() local isShow = ArenaTopMatchManager.GetcurIsShowDoGuessPopup()
LogGreen("isShow "..tostring(isShow)) LogGreen("isShow "..tostring(isShow))
-- if
local upWinNum,downWinNum = ArenaTopMatchManager.GetTwoOutOfThreeInfo(TOP_MATCH_STAGE.ELIMINATION)
local isBattleEnd = (upWinNum >= 2 or downWinNum >= 2)
LogRed("三局两胜是否结束 "..tostring(isBattleEnd))
--打开竞猜提示(处于秋后算账) --打开竞猜提示(处于秋后算账)
if IsBeted and isShow then if IsBeted and isShow and isBattleEnd then
local baseInfo = ArenaTopMatchManager.GetBaseData() local baseInfo = ArenaTopMatchManager.GetBaseData()
if baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then if baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then
LogGreen("开始弹竞猜结果") LogGreen("开始弹竞猜结果")