fix bug
This commit is contained in:
parent
49e6651345
commit
be72854d14
@ -4,6 +4,10 @@ local UNIT_RESULT_RERPORT_CELL = "app/ui/battle/cell/unit_result_report_cell"
|
||||
local MAX_SCROLL_SHOW_COUNT = 10
|
||||
local SCROLL_LINE_HEIGHT = 130
|
||||
|
||||
function BattleResultUI:isFullScreen()
|
||||
return false
|
||||
end
|
||||
|
||||
function BattleResultUI:getPrefabPath()
|
||||
return "assets/prefabs/ui/battle/battle_result_ui.prefab"
|
||||
end
|
||||
|
||||
@ -9,6 +9,7 @@ end
|
||||
|
||||
function HeroCell:refresh(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.matchImg:setSprite(GConst.ATLAS_PATH.ICON_HERO, GConst.HeroConst.MATCH_ICON_NAME[heroEntity:getMatchType()])
|
||||
end
|
||||
|
||||
@ -259,7 +259,7 @@ function HeroComp:refreshScrollRect()
|
||||
spineObject:playAnimation("idle", true)
|
||||
spineObject:setLocalScale(0.7, 0.7, 0.7)
|
||||
self.heroSpineList[i] = spineObject
|
||||
self.heroSpineList[i]:setLocalPosition(0, -60, 0)
|
||||
self.heroSpineList[i]:setLocalPosition(0, -53, 0)
|
||||
end)
|
||||
end
|
||||
else
|
||||
|
||||
@ -64,12 +64,14 @@ function HeroDetailUI:onLoadRootComplete()
|
||||
self.pageBtns = {}
|
||||
self.pageBtnTxs = {}
|
||||
self.pageBtnLocks = {}
|
||||
self.pageRedBgs = {}
|
||||
self.pageRedImgs = {}
|
||||
for i = 1, 3 do
|
||||
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.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
|
||||
self.pageBtnLocks[i]:setActive(not self:getIsOpen(i))
|
||||
end
|
||||
@ -205,13 +207,14 @@ function HeroDetailUI:refreshPageBtn()
|
||||
self.rightBtn:setActive(false)
|
||||
for i = 1, 3 do
|
||||
self.pageBtns[i]:setActive(false)
|
||||
self.pageRedImgs[i]:setActive(false)
|
||||
self.pageRedBgs[i]:setActive(false)
|
||||
end
|
||||
else
|
||||
self.leftBtn:setActive(self:isShowLeftArrow())
|
||||
self.rightBtn:setActive(self:isShowRightArrow())
|
||||
for i = 1, 3 do
|
||||
self.pageBtns[i]:setActive(true)
|
||||
self.pageRedBgs[i]:setActive(true)
|
||||
if self.page == i then
|
||||
self.pageBtns[i]:setSprite(GConst.ATLAS_PATH.COMMON, "common_tab_1")
|
||||
self.pageBtnTxs[i]:setText(self.btnTxs[i])
|
||||
|
||||
@ -65,12 +65,13 @@ function SummonMainUI:onLoadRootComplete()
|
||||
self.txFreeTime = uiMap["summon_main_ui.node.tx_free_time"]
|
||||
|
||||
self.btnWish = uiMap["summon_main_ui.node.btn_wish"] --心愿
|
||||
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.unlock.tx_guarantee"] --心愿
|
||||
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.unlock.img_wish_icon"] --心愿
|
||||
self.btnWishTx = uiMap["summon_main_ui.node.btn_wish.tx_guarantee"] --心愿
|
||||
self.btnWishIcon = uiMap["summon_main_ui.node.btn_wish.img_wish_icon"] --心愿
|
||||
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.btnSummonFree:addClickListener(function()
|
||||
self:onSummon(1)
|
||||
@ -87,14 +88,14 @@ function SummonMainUI:onLoadRootComplete()
|
||||
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.vfx01s = {}
|
||||
self.vfx02s = {}
|
||||
for i = 1, 4 do
|
||||
self.vfxs[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i]
|
||||
self.vfx01s[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i .. "_1"]
|
||||
self.vfx02s[i] = uiMap["summon_main_ui.node.vfx_c1_chouka_0" .. i .. "_2"]
|
||||
self.vfxs[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i]
|
||||
self.vfx01s[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i .. "_1"]
|
||||
self.vfx02s[i] = uiMap["summon_main_ui.summon_node.vfx_c1_chouka_0" .. i .. "_2"]
|
||||
self.vfxs[i]:setActive(false)
|
||||
self.vfx01s[i]:setActive(false)
|
||||
self.vfx02s[i]:setActive(false)
|
||||
@ -316,11 +317,13 @@ function SummonMainUI:onSummon(count, isAd)
|
||||
if isAd then
|
||||
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
|
||||
self:disableTouch()
|
||||
self.uiNode:setActive(false)
|
||||
ModuleManager.SummonManager:onForceSummonReq(count, 1, self.page)
|
||||
else
|
||||
local freeCount = DataManager.SummonData:getSummonFreeCount(self.page)
|
||||
if freeCount > 0 and count == 1 then
|
||||
self:disableTouch()
|
||||
self.uiNode:setActive(false)
|
||||
ModuleManager.SummonManager:onForceSummonReq(count, 2, self.page)
|
||||
return
|
||||
end
|
||||
@ -349,6 +352,7 @@ function SummonMainUI:onSummon(count, isAd)
|
||||
end
|
||||
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
|
||||
self:disableTouch()
|
||||
self.uiNode:setActive(false)
|
||||
ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page)
|
||||
end
|
||||
GFunc.showMessageBox(params)
|
||||
@ -362,6 +366,7 @@ function SummonMainUI:onSummon(count, isAd)
|
||||
end
|
||||
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
|
||||
self:disableTouch()
|
||||
self.uiNode:setActive(false)
|
||||
ModuleManager.SummonManager:onForceSummonReq(count, 0, self.page)
|
||||
end
|
||||
end
|
||||
@ -370,6 +375,7 @@ function SummonMainUI:onSummonRsp(result, newHero)
|
||||
self:refreshSummonBtn()
|
||||
if not result.rewards or not result.rewards[1] then
|
||||
self:enableTouch()
|
||||
self.uiNode:setActive(true)
|
||||
return
|
||||
end
|
||||
if self.aniSeq then
|
||||
@ -403,6 +409,7 @@ end
|
||||
function SummonMainUI:showHero(idx, newHero)
|
||||
if not self.summonResult[idx] then
|
||||
self:enableTouch()
|
||||
self.uiNode:setActive(true)
|
||||
for i = 1, 4 do
|
||||
self.vfxs[i]:setActive(false)
|
||||
self.vfx01s[i]:setActive(false)
|
||||
@ -410,8 +417,8 @@ function SummonMainUI:showHero(idx, newHero)
|
||||
end
|
||||
ModuleManager.SummonManager:showSummonRewardUI({
|
||||
rewards = self.summonResult,
|
||||
callback = function(count)
|
||||
self:onSummon(count)
|
||||
callback = function(count, isAd)
|
||||
self:onSummon(count, isAd)
|
||||
end,
|
||||
newHero = newHero,
|
||||
page = self.page
|
||||
|
||||
@ -57,7 +57,7 @@ function SummonWishUI:onLoadRootComplete()
|
||||
end
|
||||
|
||||
function SummonWishUI:onRefresh()
|
||||
if self.page == 1 then
|
||||
if self.page == 2 then
|
||||
self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS))
|
||||
else
|
||||
self.descTx:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_WISH_TIPS_2))
|
||||
|
||||
@ -11,6 +11,10 @@ function TalentCell:init()
|
||||
self.animator.enabled = false
|
||||
|
||||
self.baseObject:addClickListener(function()
|
||||
local lv = DataManager.TalentData:getLevels(self.idx)
|
||||
if lv <= 0 then
|
||||
return
|
||||
end
|
||||
local parmas = {}
|
||||
parmas.id = self.idx
|
||||
ModuleManager.TalentManager:showInfoUI(parmas)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user