【巅峰赛】尝试修改
parent
125dedddf8
commit
7bea1cf11a
|
@ -105,7 +105,45 @@ end
|
|||
function this.UpdateTopMatchStage(msg)
|
||||
-- 没有数据或者未开启时重新获取数据
|
||||
if not this.baseInfo or not this.baseInfo.progress or this.baseInfo.progress <= 0 then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
|
||||
local fun = function()
|
||||
-- 获取新的阶段信息
|
||||
this.baseInfo.progress = msg.progress
|
||||
this.baseInfo.endTime = msg.endTime
|
||||
this.BaseDataEndTimeCountDown()
|
||||
Log(string.format("巅峰战阶段刷新 state = %s, progress = %s, endTime = %s, myrank = %s",
|
||||
this.baseInfo.joinState, this.baseInfo.progress, this.baseInfo.endTime, this.baseInfo.myrank))
|
||||
|
||||
-- 刷新基础信息
|
||||
this.RefreshBaseInfo()
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnTopMatchDataUpdate)
|
||||
-- --刷新排行信息
|
||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.ATM_RankView.OnRankChange)
|
||||
LogGreen("this.baseInfo.battleState "..this.baseInfo.battleState)
|
||||
|
||||
-- 切换到准备阶段刷新一遍数据
|
||||
-- if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_READY then
|
||||
-- this.RequestTopMatchBaseInfo()
|
||||
-- --this.RequestBetBaseInfo()
|
||||
-- -- 竞猜阶段刷新竞猜数据
|
||||
-- else
|
||||
if this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
this.RequestBetBaseInfo()
|
||||
-- 战斗阶段不刷新
|
||||
--elseif this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_GUESS then
|
||||
-- 切换到结算阶段刷新一遍所有数据
|
||||
elseif this.baseInfo.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END then
|
||||
this.RequestTopMatchBaseInfo()
|
||||
this.RequestBetBaseInfo(nil,true)
|
||||
end
|
||||
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.TopMatch.OnTopMatchDataUpdate)
|
||||
--刷新排行信息
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.ATM_RankView.OnRankChange)
|
||||
end
|
||||
|
||||
this.RequestTopMatchBaseInfo(fun)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
@ -196,12 +196,12 @@ function this.OnShowRefresh()
|
|||
isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE) and progress ~= -2
|
||||
-- LogGreen("battleStage "..battleStage.." isActive "..tostring(isActive).." progress "..progress.." isShow "..tostring(isShow))
|
||||
this.guessPanel:SetActive(isShow)
|
||||
commonInfo.SetActive(isShow)
|
||||
-- commonInfo.SetActive(isShow)
|
||||
this.emptyPanel:SetActive(not isShow)
|
||||
end
|
||||
function this.RefreshBaseShow()
|
||||
local IsCanBet = ArenaTopMatchManager.IsCanBet()
|
||||
-- LogGreen("IsCanBet "..tostring(IsCanBet))
|
||||
LogGreen("IsCanBet "..tostring(IsCanBet))
|
||||
if IsCanBet then -- 判断是否有竞猜信息
|
||||
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
||||
this.emptyPanel:SetActive(false)
|
||||
|
|
Loading…
Reference in New Issue