This commit is contained in:
puxuan 2025-09-26 16:45:40 +08:00
parent 49e6651345
commit be72854d14
7 changed files with 33 additions and 14 deletions

View File

@ -4,6 +4,10 @@ local UNIT_RESULT_RERPORT_CELL = "app/ui/battle/cell/unit_result_report_cell"
local MAX_SCROLL_SHOW_COUNT = 10 local MAX_SCROLL_SHOW_COUNT = 10
local SCROLL_LINE_HEIGHT = 130 local SCROLL_LINE_HEIGHT = 130
function BattleResultUI:isFullScreen()
return false
end
function BattleResultUI:getPrefabPath() function BattleResultUI:getPrefabPath()
return "assets/prefabs/ui/battle/battle_result_ui.prefab" return "assets/prefabs/ui/battle/battle_result_ui.prefab"
end end

View File

@ -9,6 +9,7 @@ end
function HeroCell:refresh(heroId) function HeroCell:refresh(heroId)
local heroEntity = DataManager.HeroData:getHeroById(heroId) local heroEntity = DataManager.HeroData:getHeroById(heroId)
self.baseObject:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[heroEntity:getQlt()])
self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroEntity:getIcon()) self.icon:setSprite(GConst.ATLAS_PATH.ICON_HERO, heroEntity:getIcon())
self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroEntity:getMatchType()]) self.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroEntity:getMatchType()])
end end

View File

@ -259,7 +259,7 @@ function HeroComp:refreshScrollRect()
spineObject:playAnimation("idle", true) spineObject:playAnimation("idle", true)
spineObject:setLocalScale(0.7, 0.7, 0.7) spineObject:setLocalScale(0.7, 0.7, 0.7)
self.heroSpineList[i] = spineObject self.heroSpineList[i] = spineObject
self.heroSpineList[i]:setLocalPosition(0, -60, 0) self.heroSpineList[i]:setLocalPosition(0, -53, 0)
end) end)
end end
else else

View File

@ -64,12 +64,14 @@ function HeroDetailUI:onLoadRootComplete()
self.pageBtns = {} self.pageBtns = {}
self.pageBtnTxs = {} self.pageBtnTxs = {}
self.pageBtnLocks = {} self.pageBtnLocks = {}
self.pageRedBgs = {}
self.pageRedImgs = {} self.pageRedImgs = {}
for i = 1, 3 do for i = 1, 3 do
self.pageBtns[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i] self.pageBtns[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i]
self.pageBtnTxs[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".text"] self.pageBtnTxs[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".text"]
self.pageBtnLocks[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".lock_img"] self.pageBtnLocks[i] = uiMap["hero_detail_ui.common.btns.page_btn_" .. i .. ".lock_img"]
self.pageRedImgs[i] = uiMap["hero_detail_ui.red_node.red_img_" .. i] self.pageRedBgs[i] = uiMap["hero_detail_ui.red_node.red_img_" .. i]
self.pageRedImgs[i] = uiMap["hero_detail_ui.red_node.red_img_" .. i .. ".red_img"]
if self.pageBtnLocks[i] then if self.pageBtnLocks[i] then
self.pageBtnLocks[i]:setActive(not self:getIsOpen(i)) self.pageBtnLocks[i]:setActive(not self:getIsOpen(i))
end end
@ -205,13 +207,14 @@ function HeroDetailUI:refreshPageBtn()
self.rightBtn:setActive(false) self.rightBtn:setActive(false)
for i = 1, 3 do for i = 1, 3 do
self.pageBtns[i]:setActive(false) self.pageBtns[i]:setActive(false)
self.pageRedImgs[i]:setActive(false) self.pageRedBgs[i]:setActive(false)
end end
else else
self.leftBtn:setActive(self:isShowLeftArrow()) self.leftBtn:setActive(self:isShowLeftArrow())
self.rightBtn:setActive(self:isShowRightArrow()) self.rightBtn:setActive(self:isShowRightArrow())
for i = 1, 3 do for i = 1, 3 do
self.pageBtns[i]:setActive(true) self.pageBtns[i]:setActive(true)
self.pageRedBgs[i]:setActive(true)
if self.page == i then if self.page == i then
self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_1") self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_1")
self.pageBtnTxs[i]:setText(self.btnTxs[i]) self.pageBtnTxs[i]:setText(self.btnTxs[i])

View File

@ -65,12 +65,13 @@ function SummonMainUI:onLoadRootComplete()
self.txFreeTime = uiMap["summon_main_ui.node.tx_free_time"] self.txFreeTime = uiMap["summon_main_ui.node.tx_free_time"]
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿 self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿 self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.tx_guarantee"] --心愿
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.unlock.img_wish_icon"] --心愿 self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.img_wish_icon"] --心愿
self.btnWishAddImg = uiMap["summon_main_ui.node.btn_wish.add_img"] self.btnWishAddImg = uiMap["summon_main_ui.node.btn_wish.add_img"]
self.heroNode = uiMap["summon_main_ui.node.hero_node"] self.heroNode = uiMap["summon_main_ui.summon_node.hero_node"]
self.uiNode = uiMap["summon_main_ui.node"]
self.touchNode = uiMap["summon_main_ui.node.touch_node"] self.touchNode = uiMap["summon_main_ui.touch_node"]
self.touchNode:setActive(false) self.touchNode:setActive(false)
self.btnSummonFree:addClickListener(function() self.btnSummonFree:addClickListener(function()
self:onSummon(1) self:onSummon(1)
@ -87,14 +88,14 @@ function SummonMainUI:onLoadRootComplete()
end) end)
end) end)
self.vfxBg = uiMap["summon_main_ui.node.vfx_c1_chouka_bg_01"] self.vfxBg = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_bg_01"]
self.vfxs = {} self.vfxs = {}
self.vfx01s = {} self.vfx01s = {}
self.vfx02s = {} self.vfx02s = {}
for i = 1, 4 do for i = 1, 4 do
self.vfxs[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i] self.vfxs[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i]
self.vfx01s[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i .. "_1"] self.vfx01s[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i .. "_1"]
self.vfx02s[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i .. "_2"] self.vfx02s[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i .. "_2"]
self.vfxs[i]:setActive(false) self.vfxs[i]:setActive(false)
self.vfx01s[i]:setActive(false) self.vfx01s[i]:setActive(false)
self.vfx02s[i]:setActive(false) self.vfx02s[i]:setActive(false)
@ -316,11 +317,13 @@ function SummonMainUI:onSummon(count, isAd)
if isAd then if isAd then
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START) AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
self:disableTouch() self:disableTouch()
self.uiNode:setActive(false)
ModuleManager.SummonManager:onForceSummonReq(count, 1, self.page) ModuleManager.SummonManager:onForceSummonReq(count, 1, self.page)
else else
local freeCount = DataManager.SummonData:getSummonFreeCount(self.page) local freeCount = DataManager.SummonData:getSummonFreeCount(self.page)
if freeCount > 0 and count == 1 then if freeCount > 0 and count == 1 then
self:disableTouch() self:disableTouch()
self.uiNode:setActive(false)
ModuleManager.SummonManager:onForceSummonReq(count, 2, self.page) ModuleManager.SummonManager:onForceSummonReq(count, 2, self.page)
return return
end end
@ -349,6 +352,7 @@ function SummonMainUI:onSummon(count, isAd)
end end
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START) AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
self:disableTouch() self:disableTouch()
self.uiNode:setActive(false)
ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page) ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page)
end end
GFunc.showMessageBox(params) GFunc.showMessageBox(params)
@ -362,6 +366,7 @@ function SummonMainUI:onSummon(count, isAd)
end end
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START) AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
self:disableTouch() self:disableTouch()
self.uiNode:setActive(false)
ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page) ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page)
end end
end end
@ -370,6 +375,7 @@ function SummonMainUI:onSummonRsp(result, newHero)
self:refreshSummonBtn() self:refreshSummonBtn()
if not result.rewards or not result.rewards[1] then if not result.rewards or not result.rewards[1] then
self:enableTouch() self:enableTouch()
self.uiNode:setActive(true)
return return
end end
if self.aniSeq then if self.aniSeq then
@ -403,6 +409,7 @@ end
function SummonMainUI:showHero(idx, newHero) function SummonMainUI:showHero(idx, newHero)
if not self.summonResult[idx] then if not self.summonResult[idx] then
self:enableTouch() self:enableTouch()
self.uiNode:setActive(true)
for i = 1, 4 do for i = 1, 4 do
self.vfxs[i]:setActive(false) self.vfxs[i]:setActive(false)
self.vfx01s[i]:setActive(false) self.vfx01s[i]:setActive(false)
@ -410,8 +417,8 @@ function SummonMainUI:showHero(idx, newHero)
end end
ModuleManager.SummonManager:showSummonRewardUI({ ModuleManager.SummonManager:showSummonRewardUI({
rewards = self.summonResult, rewards = self.summonResult,
callback = function(count) callback = function(count, isAd)
self:onSummon(count) self:onSummon(count, isAd)
end, end,
newHero = newHero, newHero = newHero,
page = self.page page = self.page

View File

@ -57,7 +57,7 @@ function SummonWishUI:onLoadRootComplete()
end end
function SummonWishUI:onRefresh() function SummonWishUI:onRefresh()
if self.page == 1 then if self.page == 2 then
self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS)) self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS))
else else
self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS_2)) self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS_2))

View File

@ -11,6 +11,10 @@ function TalentCell:init()
self.animator.enabled = false self.animator.enabled = false
self.baseObject:addClickListener(function() self.baseObject:addClickListener(function()
local lv = DataManager.TalentData:getLevels(self.idx)
if lv <= 0 then
return
end
local parmas = {} local parmas = {}
parmas.id = self.idx parmas.id = self.idx
ModuleManager.TalentManager:showInfoUI(parmas) ModuleManager.TalentManager:showInfoUI(parmas)