竞技场

This commit is contained in:
kai 2025-07-13 23:04:39 +08:00
parent cfb6fc8c90
commit 0f782300da
3 changed files with 23 additions and 9 deletions

View File

@ -91,22 +91,22 @@ function ArenaRecentBattleUI:refreshRecord(obj, info)
end end
uiMap["tx_name"]:setText(name) uiMap["tx_name"]:setText(name)
if info.win then if info.win then
obj:setSprite(GConst.ATLAS_PATH.ARENA,"arena_bg_3") obj:setSprite(GConst.ATLAS_PATH.ACT_COMMON,"act_common_bg_9")
uiMap["tx_score"]:setText("<color=#2BFF35>+"..info.incr_score.."</color>") uiMap["tx_score"]:setText("<color=#2BFF35>+"..info.incr_score.."</color>")
uiMap["img_result"]:setSprite(GConst.ATLAS_PATH.ARENA, "arena_dec_2") -- uiMap["img_result"]:setSprite(GConst.ATLAS_PATH.ARENA, "arena_dec_2")
if info.attacker then if info.attacker then
uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_19)) uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_19))
else else
uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_17)) uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_17))
end end
else else
obj:setSprite(GConst.ATLAS_PATH.ARENA,"arena_bg_4") obj:setSprite(GConst.ATLAS_PATH.ACT_COMMON,"act_common_bg_8")
if info.incr_score == 0 then if info.incr_score == 0 then
uiMap["tx_score"]:setText("<color=#FF5454>-"..info.incr_score.."</color>") uiMap["tx_score"]:setText("<color=#FF5454>-"..info.incr_score.."</color>")
else else
uiMap["tx_score"]:setText("<color=#FF5454>"..info.incr_score.."</color>") uiMap["tx_score"]:setText("<color=#FF5454>"..info.incr_score.."</color>")
end end
uiMap["img_result"]:setSprite(GConst.ATLAS_PATH.ARENA, "arena_dec_3") -- uiMap["img_result"]:setSprite(GConst.ATLAS_PATH.ARENA, "arena_dec_3")
if info.attacker then if info.attacker then
uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_20)) uiMap["tx_result"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_20))
else else

View File

@ -41,7 +41,7 @@ end
function ArenaSeasonRewardUI:onLoadRootComplete() function ArenaSeasonRewardUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
self.txTitle = uiMap["arena_season_reward_ui.bg.title.tx_title"] self.txTitle = uiMap["arena_season_reward_ui.bg.tx_title"]
self.closeBtn = uiMap["arena_season_reward_ui.bg.close_btn"] self.closeBtn = uiMap["arena_season_reward_ui.bg.close_btn"]
-- 赛季奖励 -- 赛季奖励
self.seasonReward = uiMap["arena_season_reward_ui.bg.season_reward"] self.seasonReward = uiMap["arena_season_reward_ui.bg.season_reward"]

View File

@ -23,6 +23,20 @@ function ArenaUI:onClose()
end end
end end
function ArenaUI:getCurrencyParams()
if self.currencyParams == nil then
self.currencyParams = {
itemIds = {
GConst.ItemConst.ITEM_ID_GOLD,
GConst.ItemConst.ITEM_ID_GEM,
GConst.ItemConst.ITEM_ID_ARENA_TICKET
},
showType = GConst.CURRENCY_TYPE.HORIZONTAL
}
end
return self.currencyParams
end
function ArenaUI:onLoadRootComplete() function ArenaUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
@ -93,10 +107,10 @@ function ArenaUI:onLoadRootComplete()
uiMap["arena_ui.bounty_node.banner.info.name"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLEPASS_1)) uiMap["arena_ui.bounty_node.banner.info.name"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_BATTLEPASS_1))
self.rightArrow = uiMap["arena_ui.right_node.arrow_node"] self.rightArrow = uiMap["arena_ui.right_node.arrow_node"]
self.rightArrow:setVisible(false) self.rightArrow:setVisible(false)
self.rightNode = uiMap["arena_ui.right_node"] self.rightNode = uiMap["arena_ui.right_node"]
self.rightBtnCells = {} self.rightBtnCells = {}
self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["arena_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL) self.rightBtnCells.giftCell = CellManager:addCellComp(uiMap["arena_ui.right_node.side_bar.side_bar_cell"], GIFT_CELL)
self.fightBtn = uiMap["arena_ui.fight_btn"] self.fightBtn = uiMap["arena_ui.fight_btn"]
-- 体力消耗 -- 体力消耗