This commit is contained in:
puxuan 2025-11-07 17:02:38 +08:00
parent 818d4468c4
commit 36c25d54bb
2 changed files with 23 additions and 3 deletions

View File

@ -525,11 +525,11 @@ function LocalData:setTutorialSkip(value)
end
function LocalData:getFuncOpenPopSkip()
return self:getInt(self:getRoleKey(LOCAL_DATA_KEY.FUNC_OPEN_POP), 0)
return self:getInt(LOCAL_DATA_KEY.FUNC_OPEN_POP, 0)
end
function LocalData:setFuncOpenPopSkip(value)
self:setInt(self:getRoleKey(LOCAL_DATA_KEY.FUNC_OPEN_POP), value)
self:setInt(LOCAL_DATA_KEY.FUNC_OPEN_POP, value)
end
function LocalData:getFuncOpenShowList()

View File

@ -87,6 +87,9 @@ function SummonMainUI:onLoadRootComplete()
self.touchNode:setActive(false)
self.touchNodeDescTx:setActive(false)
self.touchNode:addClickListener(function()
if not self.canSkip1 then
return
end
self.showIdx = 999
end)
self.btnSummonFree:addClickListener(function()
@ -143,6 +146,7 @@ function SummonMainUI:onLoadRootComplete()
local isQuick = DataManager.SummonData:getSkipAniFlag()
self.skipNodeSelect:setActive(isQuick)
GFunc.centerImgAndTx(self.skipNodeCheck, self.skipNodeTx, 5)
self.skipNode:setActive(false)
-- self.btnTxs = {
-- I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_6),
-- I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_7),
@ -241,6 +245,7 @@ end
--刷新
function SummonMainUI:onRefresh()
self:refreshSkip()
self:refreshSummonBtn()
self:refreshSummonDesc()
-- self:refreshBtnRedPoint()
@ -248,6 +253,20 @@ function SummonMainUI:onRefresh()
self:updateTime()
end
function SummonMainUI:refreshSkip()
if not self.canSkip1 then
local totalCount = DataManager.SummonData:getSummonCount(self.page)
self.canSkip1 = totalCount >= GFunc.getConstIntValue("summon_skip_1")
end
if not self.canSkip2 then
local totalCount = DataManager.SummonData:getSummonCount(self.page)
self.canSkip2 = totalCount >= GFunc.getConstIntValue("summon_skip_2")
end
self.touchNodeDescTx:setActive(self.canSkip1)
self.skipNode:setActive(self.canSkip2)
end
-- function SummonMainUI:refreshPageBtn()
-- for i = 1, 2 do
-- if self.page == i then
@ -429,6 +448,7 @@ function SummonMainUI:onSummonEnd()
self.heroNode:removeAllChildren()
self.uiSpineObj:setActive(true)
self.uiSpineObj:playAnim("idle", true, true)
self:refreshSkip()
ModuleManager.SummonManager:showSummonRewardUI({
rewards = self.summonResult,
callback = function(count, isAd)
@ -482,7 +502,7 @@ function SummonMainUI:onSummonRsp(result, newHero)
end
self.aniSeq:AppendInterval(1.5)
self.aniSeq:AppendCallback(function()
self.touchNodeDescTx:setActive(true)
self.touchNodeDescTx:setActive(self.canSkip1)
self.showIdx = 1
self:showHero()
end)