巅峰赛打印提交
parent
13283fe135
commit
4a0ee0c3dc
|
@ -2,6 +2,18 @@
|
||||||
local this = ArenaTopMatchManager
|
local this = ArenaTopMatchManager
|
||||||
this.CurTabIndex = 1
|
this.CurTabIndex = 1
|
||||||
this.curIsShowDoGuessPopup = false
|
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()
|
function this.Initialize()
|
||||||
this.baseInfo = {}
|
this.baseInfo = {}
|
||||||
this.myBattleInfo = {}
|
this.myBattleInfo = {}
|
||||||
|
@ -449,13 +461,6 @@ function this.RequestReplayRecord(isWin, fightData, nameStr, doneFunc)
|
||||||
battlePanel:ShowNameShow(isWin, nameStr)
|
battlePanel:ShowNameShow(isWin, nameStr)
|
||||||
end
|
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()
|
function this.GetCurTopMatchName()
|
||||||
LogPink("```````````````````````````````````````````````````")
|
LogPink("```````````````````````````````````````````````````")
|
||||||
|
@ -481,14 +486,15 @@ function this.GetCurTopMatchName()
|
||||||
-- else
|
-- else
|
||||||
-- stageName = math.pow(2, opTurn) .. Language[10097]--强
|
-- stageName = math.pow(2, opTurn) .. Language[10097]--强
|
||||||
-- end
|
-- end
|
||||||
stageName = stageNameTable[this.baseInfo.battleTurn]
|
stageName = stageNameTable[this.baseInfo.battleTurn] or "不知道"..this.baseInfo.battleTurn
|
||||||
end
|
end
|
||||||
local stateName = TOP_MATCH_STATE_NAME[this.baseInfo.battleState] or Language[10127]--未知
|
local stateName = TOP_MATCH_STATE_NAME[this.baseInfo.battleState] or Language[10127]--未知
|
||||||
return titleName, stageName, stateName
|
return titleName, stageName, stateName
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 通过总轮数获取当前阶段名称
|
-- 通过总轮数获取当前阶段名称
|
||||||
function this.GetTurnNameByRoundTimes(roundTimes)
|
function this.GetTurnNameByRoundTimes(roundTimes,curTurn)
|
||||||
|
LogGreen("roundTimes "..roundTimes)
|
||||||
if not roundTimes or roundTimes <= 0 then
|
if not roundTimes or roundTimes <= 0 then
|
||||||
return Language[10122]
|
return Language[10122]
|
||||||
end
|
end
|
||||||
|
@ -496,18 +502,20 @@ function this.GetTurnNameByRoundTimes(roundTimes)
|
||||||
local maxRound = this.GetChooseMaxRound()
|
local maxRound = this.GetChooseMaxRound()
|
||||||
if roundTimes <= maxRound then
|
if roundTimes <= maxRound then
|
||||||
return Language[10125]..NumToSimplenessFont[roundTimes]
|
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
|
else
|
||||||
return math.pow(2, opTurn) .. Language[10097]
|
-- 淘汰赛
|
||||||
|
return stageNameTable[roundTimes] or "不知道"..this.baseInfo.battleTurn
|
||||||
end
|
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]
|
return Language[10127]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,7 @@ end
|
||||||
--设置竞猜币
|
--设置竞猜币
|
||||||
function this.SetCoin()
|
function this.SetCoin()
|
||||||
local oldNum= ArenaTopMatchManager.GetCoinNum()
|
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 newNum= (BagManager.GetItemCountById(GUESS_COIN) - oldNum) * ArenaTopMatchManager.rate + oldNum --BagManager.GetItemCountById(GUESS_COIN)
|
||||||
local tempNum=oldNum
|
local tempNum=oldNum
|
||||||
|
|
||||||
|
|
|
@ -164,8 +164,8 @@ function ATM_GuessView:OnOpen(...)
|
||||||
|
|
||||||
local isActive = ArenaTopMatchManager.IsTopMatchActive()
|
local isActive = ArenaTopMatchManager.IsTopMatchActive()
|
||||||
battleStage = ArenaTopMatchManager.GetBaseData().battleStage
|
battleStage = ArenaTopMatchManager.GetBaseData().battleStage
|
||||||
LogGreen("battleStage "..battleStage.." "..tostring(isActive))
|
|
||||||
local isShow = isActive and (battleStage == TOP_MATCH_STAGE.ELIMINATION or battleStage == TOP_MATCH_STAGE.CHOOSE)
|
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.guessPanel:SetActive(isShow)
|
||||||
this.emptyPanel:SetActive(not isShow)
|
this.emptyPanel:SetActive(not isShow)
|
||||||
if not isShow then return end
|
if not isShow then return end
|
||||||
|
@ -196,6 +196,7 @@ function this.RefreshBaseShow()
|
||||||
if IsCanBet then -- 判断是否有竞猜信息
|
if IsCanBet then -- 判断是否有竞猜信息
|
||||||
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
local betBattleInfo = ArenaTopMatchManager.GetBetBattleInfo()
|
||||||
this.emptyPanel:SetActive(false)
|
this.emptyPanel:SetActive(false)
|
||||||
|
LogGreen("sssssssssssss "..tostring(IsCanBet))
|
||||||
this.guessPanel:SetActive(true)
|
this.guessPanel:SetActive(true)
|
||||||
commonInfo.SetActive(true)
|
commonInfo.SetActive(true)
|
||||||
commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false)
|
commonInfo.SetInfoData(2, betBattleInfo.myInfo, betBattleInfo.enemyInfo, betBattleInfo.result, false)
|
||||||
|
@ -229,6 +230,7 @@ function this.RefreshBaseShow()
|
||||||
this.blueGuess:SetActive(false)
|
this.blueGuess:SetActive(false)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
LogGreen("sssssssssssss "..tostring(true))
|
||||||
this.emptyPanel:SetActive(true)
|
this.emptyPanel:SetActive(true)
|
||||||
this.guessPanel:SetActive(false)
|
this.guessPanel:SetActive(false)
|
||||||
commonInfo.SetActive(false)
|
commonInfo.SetActive(false)
|
||||||
|
|
|
@ -105,7 +105,7 @@ function this.StateChange(isOpen)
|
||||||
end
|
end
|
||||||
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.btnRecord:SetActive(isOpen and isJoin)
|
||||||
this.btnTeamRank: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)
|
this.btnFightDetail:SetActive(isOpen and isJoin and baseData.battleState == TOP_MATCH_TIME_STATE.OPEN_IN_END)
|
||||||
|
|
Loading…
Reference in New Issue