界面优化
This commit is contained in:
parent
fd24935c4b
commit
2038237e6c
@ -1,5 +1,17 @@
|
|||||||
local LocalizationGlobalConst =
|
local LocalizationGlobalConst =
|
||||||
{
|
{
|
||||||
|
|
||||||
|
["ACT_PVP_DESC_19"] = "ACT_PVP_DESC_19",
|
||||||
|
["ACT_PVP_DESC_20"] = "ACT_PVP_DESC_20",
|
||||||
|
["ACT_PVP_TALK_DESC_1"] ="ACT_PVP_TALK_DESC_1",
|
||||||
|
["ACT_PVP_TALK_DESC_2"] ="ACT_PVP_TALK_DESC_2",
|
||||||
|
["ACT_PVP_TALK_DESC_3"] ="ACT_PVP_TALK_DESC_3",
|
||||||
|
["ACT_PVP_TALK_DESC_4"] ="ACT_PVP_TALK_DESC_4",
|
||||||
|
["ACT_PVP_TALK_DESC_5"] ="ACT_PVP_TALK_DESC_5",
|
||||||
|
["ACT_PVP_TALK_DESC_6"] ="ACT_PVP_TALK_DESC_6",
|
||||||
|
["ACT_PVP_TALK_DESC_7"] ="ACT_PVP_TALK_DESC_7",
|
||||||
|
["ACT_PVP_TALK_DESC_8"] ="ACT_PVP_TALK_DESC_8",
|
||||||
|
["ACT_PVP_TALK_DESC_9"] ="ACT_PVP_TALK_DESC_9",
|
||||||
MAIN_BTN_1 = "MAIN_BTN_1",
|
MAIN_BTN_1 = "MAIN_BTN_1",
|
||||||
QLT_DESC_1 = "QLT_DESC_1",
|
QLT_DESC_1 = "QLT_DESC_1",
|
||||||
QLT_DESC_2 = "QLT_DESC_2",
|
QLT_DESC_2 = "QLT_DESC_2",
|
||||||
|
|||||||
@ -599,6 +599,21 @@ local localization_global =
|
|||||||
["ACT_PVP_DESC_16"] = "欢迎入股酒馆基金,在酒馆挑战对手,累计积分可领取奖励分红哟~",
|
["ACT_PVP_DESC_16"] = "欢迎入股酒馆基金,在酒馆挑战对手,累计积分可领取奖励分红哟~",
|
||||||
["ACT_PVP_DESC_17"] = "累计胜场",
|
["ACT_PVP_DESC_17"] = "累计胜场",
|
||||||
["ACT_PVP_DESC_18"] = "1.活动前七天可以挑战,累计胜场排名。\n2.第八天可领取排行榜奖励,第八天无挑战。",
|
["ACT_PVP_DESC_18"] = "1.活动前七天可以挑战,累计胜场排名。\n2.第八天可领取排行榜奖励,第八天无挑战。",
|
||||||
|
|
||||||
|
["ACT_PVP_DESC_19"] = "胜:{0}",
|
||||||
|
["ACT_PVP_DESC_20"] = "负:{0}",
|
||||||
|
|
||||||
|
|
||||||
|
["ACT_PVP_TALK_DESC_1"] =" 梦魇随机对话1",
|
||||||
|
["ACT_PVP_TALK_DESC_2"] =" 梦魇随机对话2",
|
||||||
|
["ACT_PVP_TALK_DESC_3"] =" 梦魇随机对话3",
|
||||||
|
["ACT_PVP_TALK_DESC_4"] =" 梦魇随机对话4",
|
||||||
|
["ACT_PVP_TALK_DESC_5"] =" 梦魇随机对话5",
|
||||||
|
|
||||||
|
["ACT_PVP_TALK_DESC_6"] ="梦魇随机对话胜利1",
|
||||||
|
["ACT_PVP_TALK_DESC_7"] ="梦魇随机对话胜利2",
|
||||||
|
["ACT_PVP_TALK_DESC_8"] ="梦魇随机对话失败1",
|
||||||
|
["ACT_PVP_TALK_DESC_9"] ="梦魇随机对话失败2",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -315,6 +315,7 @@ GConst.MESSAGE_BOX_SHOW_TODAY = {
|
|||||||
HOT_SELL_BUY = 2,
|
HOT_SELL_BUY = 2,
|
||||||
ACTIVITY_BUY_LEVEL = 3,
|
ACTIVITY_BUY_LEVEL = 3,
|
||||||
RUNES_AUTO = 4,
|
RUNES_AUTO = 4,
|
||||||
|
ACT_PVP_BUY_BOUNTY_LEVE = 5,
|
||||||
}
|
}
|
||||||
|
|
||||||
GConst.QUALITY_TYPE =
|
GConst.QUALITY_TYPE =
|
||||||
|
|||||||
@ -278,8 +278,8 @@ end
|
|||||||
function ActPvpManager:rspFightEnd(result)
|
function ActPvpManager:rspFightEnd(result)
|
||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
DataManager.ActPvpData:updateData(result.activity_pvp)
|
DataManager.ActPvpData:updateData(result.activity_pvp)
|
||||||
|
DataManager.ActPvpData:setLastTurnWin(nil) -- 默认不给状态
|
||||||
-- 展示结算界面
|
-- 展示结算界面
|
||||||
|
|
||||||
if result.reqData then
|
if result.reqData then
|
||||||
local taskStat = result.reqData.task_stat
|
local taskStat = result.reqData.task_stat
|
||||||
if taskStat then
|
if taskStat then
|
||||||
@ -289,6 +289,9 @@ function ActPvpManager:rspFightEnd(result)
|
|||||||
ModuleManager.TaskManager:addFightTaskProgress(taskStat)
|
ModuleManager.TaskManager:addFightTaskProgress(taskStat)
|
||||||
end
|
end
|
||||||
ModuleManager.BattleManager:showActPvpResultUI(GConst.BattleConst.BATTLE_TYPE.ACT_PVP, result.rewards, result.reqData.battleReport)
|
ModuleManager.BattleManager:showActPvpResultUI(GConst.BattleConst.BATTLE_TYPE.ACT_PVP, result.rewards, result.reqData.battleReport)
|
||||||
|
if not DataManager.ActPvpData:isPlaying() then -- 进入下一轮
|
||||||
|
DataManager.ActPvpData:setLastTurnWin(result.reqData.win)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -354,11 +357,22 @@ function ActPvpManager:reqBuyBountyLevel()
|
|||||||
if level + 1 > DataManager.ActPvpData:getMaxBountyLevel() then
|
if level + 1 > DataManager.ActPvpData:getMaxBountyLevel() then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local cost = DataManager.ActPvpData:getBuyBountyLevelCost()
|
||||||
local params = {
|
local params ={
|
||||||
id = level
|
titleTx = I18N:getGlobalText(I18N.GlobalConst.BOUNTY_BUY_LEVEL_TITLE),
|
||||||
}
|
content = I18N:getGlobalText(I18N.GlobalConst.BOUNTY_BUY_LEVEL_COUNTENT),
|
||||||
self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBountyClaimByDiamondReq, params, {}, self.rspBuyBountyLevel, BIReport.ITEM_GET_TYPE.ACT_PVP_BUY_BOUNTY_LEVEL)
|
boxType = GConst.MESSAGE_BOX_TYPE.MB_OK_CANCEL,
|
||||||
|
showToday = GConst.MESSAGE_BOX_SHOW_TODAY.ACT_PVP_BUY_BOUNTY_LEVEL,
|
||||||
|
costId = cost.id,
|
||||||
|
costNum = cost.num,
|
||||||
|
okFunc = function()
|
||||||
|
local params = {
|
||||||
|
id = level
|
||||||
|
}
|
||||||
|
self:sendMessage(ProtoMsgType.FromMsgEnum.ActivityPVPBountyClaimByDiamondReq, params, {}, self.rspBuyBountyLevel, BIReport.ITEM_GET_TYPE.ACT_PVP_BUY_BOUNTY_LEVEL)
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
GFunc.showMessageBox(params)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ActPvpManager:rspBuyBountyLevel(result)
|
function ActPvpManager:rspBuyBountyLevel(result)
|
||||||
|
|||||||
@ -1,11 +1,42 @@
|
|||||||
local ActPvpMainUI = class("ActPvpMainUI", BaseUI)
|
local ActPvpMainUI = class("ActPvpMainUI", BaseUI)
|
||||||
|
|
||||||
local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell"
|
local TASK_DESC =
|
||||||
|
{
|
||||||
|
"ACT_PVP_TALK_DESC_1",
|
||||||
|
"ACT_PVP_TALK_DESC_2",
|
||||||
|
"ACT_PVP_TALK_DESC_3",
|
||||||
|
"ACT_PVP_TALK_DESC_4",
|
||||||
|
"ACT_PVP_TALK_DESC_5"
|
||||||
|
}
|
||||||
|
|
||||||
|
local WIN_TASK_DESC =
|
||||||
|
{
|
||||||
|
"ACT_PVP_TALK_DESC_6",
|
||||||
|
"ACT_PVP_TALK_DESC_7",
|
||||||
|
}
|
||||||
|
|
||||||
|
local FAIL_TASK_DESC =
|
||||||
|
{
|
||||||
|
"ACT_PVP_TALK_DESC_8",
|
||||||
|
"ACT_PVP_TALK_DESC_9",
|
||||||
|
}
|
||||||
|
|
||||||
function ActPvpMainUI:ctor()
|
function ActPvpMainUI:ctor()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ActPvpMainUI:getCurrencyParams()
|
||||||
|
if self.currencyParams == nil then
|
||||||
|
self.currencyParams = {
|
||||||
|
itemIds = {
|
||||||
|
GConst.ItemConst.ITEM_ID_GEM,
|
||||||
|
},
|
||||||
|
showType = GConst.CURRENCY_TYPE.HORIZONTAL
|
||||||
|
}
|
||||||
|
end
|
||||||
|
return self.currencyParams
|
||||||
|
end
|
||||||
|
|
||||||
function ActPvpMainUI:getPrefabPath()
|
function ActPvpMainUI:getPrefabPath()
|
||||||
return "assets/prefabs/ui/activity/act_pvp/act_pvp_main_ui.prefab"
|
return "assets/prefabs/ui/activity/act_pvp/act_pvp_main_ui.prefab"
|
||||||
end
|
end
|
||||||
@ -15,6 +46,7 @@ function ActPvpMainUI:onLoadRootComplete()
|
|||||||
self:_addListeners()
|
self:_addListeners()
|
||||||
self:_bind()
|
self:_bind()
|
||||||
|
|
||||||
|
self:showTalk()
|
||||||
self:refreshTime()
|
self:refreshTime()
|
||||||
if self.actCountdownSid then
|
if self.actCountdownSid then
|
||||||
self:unscheduleGlobal(self.actCountdownSid)
|
self:unscheduleGlobal(self.actCountdownSid)
|
||||||
@ -29,6 +61,11 @@ function ActPvpMainUI:onPressBackspace()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ActPvpMainUI:onClose()
|
function ActPvpMainUI:onClose()
|
||||||
|
if self.showTalkSeq then
|
||||||
|
self.showTalkSeq:Kill()
|
||||||
|
self.showTalkSeq = nil
|
||||||
|
end
|
||||||
|
|
||||||
if self.countdownSid then
|
if self.countdownSid then
|
||||||
self:unscheduleGlobal(self.countdownSid)
|
self:unscheduleGlobal(self.countdownSid)
|
||||||
self.countdownSid = nil
|
self.countdownSid = nil
|
||||||
@ -79,6 +116,10 @@ function ActPvpMainUI:_addListeners()
|
|||||||
self:closeUI()
|
self:closeUI()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function()
|
||||||
|
self:closeUI()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ActPvpMainUI:_bind()
|
function ActPvpMainUI:_bind()
|
||||||
@ -199,4 +240,33 @@ function ActPvpMainUI:refreshDialyRewardNode()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ActPvpMainUI:showTalk()
|
||||||
|
local uiMap = self.root:genAllChildren()
|
||||||
|
local popBg = uiMap["act_pvp_main_ui.bg.pop_bg"]
|
||||||
|
local popDesc = uiMap["act_pvp_main_ui.bg.pop_desc"]
|
||||||
|
self.curTaskDescList = TASK_DESC
|
||||||
|
if DataManager.ActPvpData:getLastTurnWin() ~= nil then
|
||||||
|
if DataManager.ActPvpData:getLastTurnWin() then
|
||||||
|
self.curTaskDescList = WIN_TASK_DESC
|
||||||
|
else
|
||||||
|
self.curTaskDescList = FAIL_TASK_DESC
|
||||||
|
end
|
||||||
|
DataManager.ActPvpData:setLastTurnWin(nil)
|
||||||
|
end
|
||||||
|
if self.showTalkSeq then
|
||||||
|
self.showTalkSeq:Kill()
|
||||||
|
self.showTalkSeq = nil
|
||||||
|
end
|
||||||
|
self.showTalkSeq = self.root:createBindTweenSequence()
|
||||||
|
self.showTalkSeq:AppendCallback(function()
|
||||||
|
local desc = self.curTaskDescList[math.random(1, #self.curTaskDescList)]
|
||||||
|
popDesc:setText(I18N:getGlobalText(I18N.GlobalConst[desc]))
|
||||||
|
popBg:setVisible(false)
|
||||||
|
end)
|
||||||
|
self.showTalkSeq:Append(popBg:getTransform():DOScale(1, 1))
|
||||||
|
self.showTalkSeq:AppendInterval(5)
|
||||||
|
self.showTalkSeq:Append(popBg:getTransform():DOScale(0, 1))
|
||||||
|
self.showTalkSeq:SetLoops(-1)
|
||||||
|
end
|
||||||
|
|
||||||
return ActPvpMainUI
|
return ActPvpMainUI
|
||||||
@ -1,6 +1,14 @@
|
|||||||
local ActPvpPlayingUI = class("ActPvpPlayingUI", BaseUI)
|
local ActPvpPlayingUI = class("ActPvpPlayingUI", BaseUI)
|
||||||
|
|
||||||
local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell"
|
local SIMPLE_HERO_CELL = "app/ui/activity/act_pvp/cell/simple_hero_cell"
|
||||||
|
local TASK_DESC =
|
||||||
|
{
|
||||||
|
"ACT_PVP_TALK_DESC_1",
|
||||||
|
"ACT_PVP_TALK_DESC_2",
|
||||||
|
"ACT_PVP_TALK_DESC_3",
|
||||||
|
"ACT_PVP_TALK_DESC_4",
|
||||||
|
"ACT_PVP_TALK_DESC_5"
|
||||||
|
}
|
||||||
|
|
||||||
function ActPvpPlayingUI:ctor()
|
function ActPvpPlayingUI:ctor()
|
||||||
|
|
||||||
@ -15,6 +23,7 @@ function ActPvpPlayingUI:onLoadRootComplete()
|
|||||||
self:_addListeners()
|
self:_addListeners()
|
||||||
self:_bind()
|
self:_bind()
|
||||||
|
|
||||||
|
self:showTalk()
|
||||||
self:refreshTime()
|
self:refreshTime()
|
||||||
if self.actCountdownSid then
|
if self.actCountdownSid then
|
||||||
self:unscheduleGlobal(self.actCountdownSid)
|
self:unscheduleGlobal(self.actCountdownSid)
|
||||||
@ -29,6 +38,11 @@ function ActPvpPlayingUI:onPressBackspace()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ActPvpPlayingUI:onClose()
|
function ActPvpPlayingUI:onClose()
|
||||||
|
if self.showTalkSeq then
|
||||||
|
self.showTalkSeq:Kill()
|
||||||
|
self.showTalkSeq = nil
|
||||||
|
end
|
||||||
|
|
||||||
if self.countdownSid then
|
if self.countdownSid then
|
||||||
self:unscheduleGlobal(self.countdownSid)
|
self:unscheduleGlobal(self.countdownSid)
|
||||||
self.countdownSid = nil
|
self.countdownSid = nil
|
||||||
@ -206,4 +220,24 @@ function ActPvpPlayingUI:refreshDialyRewardNode()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ActPvpPlayingUI:showTalk()
|
||||||
|
local uiMap = self.root:genAllChildren()
|
||||||
|
local popBg = uiMap["act_pvp_playing_ui.bg.pop_bg"]
|
||||||
|
local popDesc = uiMap["act_pvp_main_ui.bg.pop_desc"]
|
||||||
|
if self.showTalkSeq then
|
||||||
|
self.showTalkSeq:Kill()
|
||||||
|
self.showTalkSeq = nil
|
||||||
|
end
|
||||||
|
self.showTalkSeq = self.root:createBindTweenSequence()
|
||||||
|
self.showTalkSeq:AppendCallback(function()
|
||||||
|
local desc = TASK_DESC[math.random(1, #TASK_DESC)]
|
||||||
|
popDesc:setText(I18N:getGlobalText(I18N.GlobalConst[desc]))
|
||||||
|
popBg:setVisible(false)
|
||||||
|
end)
|
||||||
|
self.showTalkSeq:Append(popBg:getTransform():DOScale(1, 1))
|
||||||
|
self.showTalkSeq:AppendInterval(5)
|
||||||
|
self.showTalkSeq:Append(popBg:getTransform():DOScale(0, 1))
|
||||||
|
self.showTalkSeq:SetLoops(-1)
|
||||||
|
end
|
||||||
|
|
||||||
return ActPvpPlayingUI
|
return ActPvpPlayingUI
|
||||||
@ -74,6 +74,8 @@ function BattleActPvpResultUI:onLoadRootComplete()
|
|||||||
-- 奖励节点
|
-- 奖励节点
|
||||||
self.rewardNode = uiMap["battle_rune_result_ui.reward_node"]
|
self.rewardNode = uiMap["battle_rune_result_ui.reward_node"]
|
||||||
self.rewardTxTitle = uiMap["battle_rune_result_ui.reward_title"]
|
self.rewardTxTitle = uiMap["battle_rune_result_ui.reward_title"]
|
||||||
|
self.rewardTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC))
|
||||||
|
self.continue:setText(I18N:getGlobalText(I18N.GlobalConst.CONTINUE_DESC))
|
||||||
|
|
||||||
-- 战令节点
|
-- 战令节点
|
||||||
|
|
||||||
@ -190,8 +192,8 @@ function BattleActPvpResultUI:refreshUnitInfo()
|
|||||||
self.unitTxDesc3:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_7, GFunc.num2Str(self.totalDmg)))
|
self.unitTxDesc3:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_7, GFunc.num2Str(self.totalDmg)))
|
||||||
|
|
||||||
local actData = DataManager.ActPvpData
|
local actData = DataManager.ActPvpData
|
||||||
self.txFightWin:setText(actData:getWinCount() .. "/" .. actData:getWinLimit())
|
self.txFightWin:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_19, actData:getWinCount() .. "/" .. actData:getWinLimit()))
|
||||||
self.txFightLose:setText(actData:getLoseCount() .. "/" .. actData:getLoseLimit())
|
self.txFightLose:setText(I18N:getGlobalText(I18N.GlobalConst.ACT_PVP_DESC_20, actData:getLoseCount() .. "/" .. actData:getLoseLimit()))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 展示结算奖励的出现动画
|
-- 展示结算奖励的出现动画
|
||||||
|
|||||||
@ -389,6 +389,14 @@ function ActPvpData:getFlushCost()
|
|||||||
return self.flushCost
|
return self.flushCost
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function ActPvpData:getLastTurnWin()
|
||||||
|
return self.lastTurnWin
|
||||||
|
end
|
||||||
|
|
||||||
|
function ActPvpData:setLastTurnWin(win)
|
||||||
|
self.lastTurnWin = win
|
||||||
|
end
|
||||||
|
|
||||||
---- 排行榜
|
---- 排行榜
|
||||||
|
|
||||||
function ActPvpData:updateRankInfo(ranks, selfRank)
|
function ActPvpData:updateRankInfo(ranks, selfRank)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user