巅峰赛打印提交

dev_chengFeng
zhangqiang 2020-07-10 15:16:50 +08:00
parent 13283fe135
commit 4a0ee0c3dc
4 changed files with 32 additions and 21 deletions

View File

@ -2,6 +2,18 @@
local this = ArenaTopMatchManager
this.CurTabIndex = 1
this.curIsShowDoGuessPopup = false
local stageNameTable = {
[1] = 32 .. Language[10097],--强
[2] = 16 .. Language[10097],--强
[3] = 8 .. Language[10097],--强
[4] = 4 .. Language[10097],--强
[5] = Language[10126],
[8] = 32 .. Language[10097],--强
[9] = 16 .. Language[10097],--强
[10] = 8 .. Language[10097],--强
[11] = 4 .. Language[10097],--强
[12] = Language[10126],
}
function this.Initialize()
this.baseInfo = {}
this.myBattleInfo = {}
@ -449,13 +461,6 @@ function this.RequestReplayRecord(isWin, fightData, nameStr, doneFunc)
battlePanel:ShowNameShow(isWin, nameStr)
end
local stageNameTable = {
[0] = 32 .. Language[10097],--强
[1] = 16 .. Language[10097],--强
[2] = 8 .. Language[10097],--强
[3] = 4 .. Language[10097],--强
[4] = Language[10126],
}
-- 获取当前阶段名称
function this.GetCurTopMatchName()
LogPink("```````````````````````````````````````````````````")
@ -481,14 +486,15 @@ function this.GetCurTopMatchName()
-- else
-- stageName = math.pow(2, opTurn) .. Language[10097]--强
-- end
stageName = stageNameTable[this.baseInfo.battleTurn]
stageName = stageNameTable[this.baseInfo.battleTurn] or "不知道"..this.baseInfo.battleTurn
end
local stateName = TOP_MATCH_STATE_NAME[this.baseInfo.battleState] or Language[10127]--未知
return titleName, stageName, stateName
end
-- 通过总轮数获取当前阶段名称
function this.GetTurnNameByRoundTimes(roundTimes)
function this.GetTurnNameByRoundTimes(roundTimes,curTurn)
LogGreen("roundTimes "..roundTimes)
if not roundTimes or roundTimes <= 0 then
return Language[10122]
end
@ -496,18 +502,20 @@ function this.GetTurnNameByRoundTimes(roundTimes)
local maxRound = this.GetChooseMaxRound()
if roundTimes <= maxRound then
return Language[10125]..NumToSimplenessFont[roundTimes]
end
-- 淘汰赛
LogGreen("roundTimes "..roundTimes)
local curTurn = roundTimes - maxRound -- 当前淘汰赛轮数
local maxTurn = this.GetEliminationMaxRound()
local opTurn = maxTurn - curTurn + 1 --- 将服务器发过来的轮数倒序,方便计算
LogGreen("opTurn "..opTurn.." maxTurn "..maxTurn.." curTurn "..curTurn)
if opTurn == 1 then
return Language[10126]
else
return math.pow(2, opTurn) .. Language[10097]
-- 淘汰赛
return stageNameTable[roundTimes] or "不知道"..this.baseInfo.battleTurn
end
-- local curTurn = roundTimes - maxRound -- 当前淘汰赛轮数
-- local maxTurn = this.GetEliminationMaxRound()
-- local opTurn = maxTurn - curTurn + 1 --- 将服务器发过来的轮数倒序,方便计算
-- LogGreen("opTurn "..opTurn.." maxTurn "..maxTurn.." curTurn "..curTurn)
-- if opTurn == 1 then
-- return Language[10126]
-- else
-- return math.pow(2, opTurn) .. Language[10097]
-- end
return Language[10127]
end

View File

@ -174,6 +174,7 @@ end
--设置竞猜币
function this.SetCoin()
local oldNum= ArenaTopMatchManager.GetCoinNum()
LogGreen("oldNum "..oldNum.." BagManager.GetItemCountById(GUESS_COIN) "..BagManager.GetItemCountById(GUESS_COIN))
local newNum= (BagManager.GetItemCountById(GUESS_COIN) - oldNum) * ArenaTopMatchManager.rate + oldNum --BagManager.GetItemCountById(GUESS_COIN)
local tempNum=oldNum

View File

@ -164,8 +164,8 @@ function ATM_GuessView:OnOpen(...)
local isActive = ArenaTopMatchManager.IsTopMatchActive()
battleStage = ArenaTopMatchManager.GetBaseData().battleStage
LogGreen("battleStage "..battleStage.." "..tostring(isActive))
local isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE)
LogGreen("battleStage "..battleStage.." isActive "..tostring(isActive).." isShow "..tostring(isShow))
this.guessPanel:SetActive(isShow)
this.emptyPanel:SetActive(not isShow)
if not isShow then return end
@ -196,6 +196,7 @@ function this.RefreshBaseShow()
if IsCanBet then -- 判断是否有竞猜信息
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
this.emptyPanel:SetActive(false)
LogGreen("sssssssssssss "..tostring(IsCanBet))
this.guessPanel:SetActive(true)
commonInfo.SetActive(true)
commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false)
@ -229,6 +230,7 @@ function this.RefreshBaseShow()
this.blueGuess:SetActive(false)
end
else
LogGreen("sssssssssssss "..tostring(true))
this.emptyPanel:SetActive(true)
this.guessPanel:SetActive(false)
commonInfo.SetActive(false)

View File

@ -105,7 +105,7 @@ function this.StateChange(isOpen)
end
end
this.containPanel:SetActive(not isOpen or not isJoin or battleInfo.result == 0)
this.containPanel:SetActive(not isOpen or not isJoin or isOver or baseData.loser)
this.btnRecord:SetActive(isOpen and isJoin)
this.btnTeamRank:SetActive(isOpen and isJoin)
this.btnFightDetail:SetActive(isOpen and isJoin and baseData.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END)