召唤跳过
This commit is contained in:
parent
c9e55aae19
commit
b69fd2227d
@ -972,6 +972,7 @@ local LocalizationGlobalConst =
|
|||||||
FUND_CHAPTER_TAG_DESC_22 = "FUND_CHAPTER_TAG_DESC_22",
|
FUND_CHAPTER_TAG_DESC_22 = "FUND_CHAPTER_TAG_DESC_22",
|
||||||
TALENT_HELP = "TALENT_HELP",
|
TALENT_HELP = "TALENT_HELP",
|
||||||
RECOMMENDED_POWER = "RECOMMENDED_POWER",
|
RECOMMENDED_POWER = "RECOMMENDED_POWER",
|
||||||
|
CLICK_SKIP_DESC = "CLICK_SKIP_DESC",
|
||||||
}
|
}
|
||||||
|
|
||||||
return LocalizationGlobalConst
|
return LocalizationGlobalConst
|
||||||
@ -972,6 +972,7 @@ local localization_global =
|
|||||||
["FUND_CHAPTER_TAG_DESC_22"] = "关卡基金22",
|
["FUND_CHAPTER_TAG_DESC_22"] = "关卡基金22",
|
||||||
["TALENT_HELP"] = "天赋帮助",
|
["TALENT_HELP"] = "天赋帮助",
|
||||||
["RECOMMENDED_POWER"] = "推荐战斗力:{0}",
|
["RECOMMENDED_POWER"] = "推荐战斗力:{0}",
|
||||||
|
["CLICK_SKIP_DESC"] = "点击跳过",
|
||||||
}
|
}
|
||||||
|
|
||||||
return localization_global
|
return localization_global
|
||||||
@ -82,7 +82,13 @@ function SummonMainUI:onLoadRootComplete()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.touchNode = uiMap["summon_main_ui.touch_node"]
|
self.touchNode = uiMap["summon_main_ui.touch_node"]
|
||||||
|
self.touchNodeDescTx = uiMap["summon_main_ui.touch_node.continue"]
|
||||||
|
self.touchNodeDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_SKIP_DESC))
|
||||||
self.touchNode:setActive(false)
|
self.touchNode:setActive(false)
|
||||||
|
self.touchNodeDescTx:setActive(false)
|
||||||
|
self.touchNode:addClickListener(function()
|
||||||
|
self.showIdx = 999
|
||||||
|
end)
|
||||||
self.btnSummonFree:addClickListener(function()
|
self.btnSummonFree:addClickListener(function()
|
||||||
self:onSummon(1)
|
self:onSummon(1)
|
||||||
end)
|
end)
|
||||||
@ -354,6 +360,7 @@ function SummonMainUI:summon(count, summonType)
|
|||||||
if not DataManager.SummonData:getSkipAniFlag() then
|
if not DataManager.SummonData:getSkipAniFlag() then
|
||||||
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
|
AudioManager:playEffect(AudioManager.EFFECT_ID.UI_SUMMON_START)
|
||||||
end
|
end
|
||||||
|
self.touchNodeDescTx:setActive(false)
|
||||||
self:disableTouch()
|
self:disableTouch()
|
||||||
self.uiNode:setActive(false)
|
self.uiNode:setActive(false)
|
||||||
ModuleManager.SummonManager:onForceSummonReq(count, summonType, self.page)
|
ModuleManager.SummonManager:onForceSummonReq(count, summonType, self.page)
|
||||||
@ -416,6 +423,25 @@ function SummonMainUI:playSummonAni(result, newHero)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SummonMainUI:onSummonEnd()
|
||||||
|
self:enableTouch()
|
||||||
|
self.uiNode:setActive(true)
|
||||||
|
self.heroNode:removeAllChildren()
|
||||||
|
self.uiSpineObj:setActive(true)
|
||||||
|
self.uiSpineObj:playAnim("idle", true, true)
|
||||||
|
ModuleManager.SummonManager:showSummonRewardUI({
|
||||||
|
rewards = self.summonResult,
|
||||||
|
callback = function(count, isAd)
|
||||||
|
self:onSummon(count, isAd)
|
||||||
|
end,
|
||||||
|
closeCallBack =function ()
|
||||||
|
self:fly()
|
||||||
|
end,
|
||||||
|
newHero = self.newHero,
|
||||||
|
page = self.page
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
function SummonMainUI:onSummonRsp(result, newHero)
|
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
|
||||||
@ -423,7 +449,8 @@ function SummonMainUI:onSummonRsp(result, newHero)
|
|||||||
self.uiNode:setActive(true)
|
self.uiNode:setActive(true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local rewards = {}
|
self.newHero = newHero
|
||||||
|
self.summonResult = {}
|
||||||
local qlt = 3
|
local qlt = 3
|
||||||
for _, v in ipairs(result.rewards) do
|
for _, v in ipairs(result.rewards) do
|
||||||
local itemType = ModuleManager.ItemManager:getItemType(v.item.id)
|
local itemType = ModuleManager.ItemManager:getItemType(v.item.id)
|
||||||
@ -431,7 +458,7 @@ function SummonMainUI:onSummonRsp(result, newHero)
|
|||||||
local id = v.item.id
|
local id = v.item.id
|
||||||
local q = DataManager.HeroData:getHeroQlt(id)
|
local q = DataManager.HeroData:getHeroQlt(id)
|
||||||
qlt = math.max(qlt, q)
|
qlt = math.max(qlt, q)
|
||||||
table.insert(rewards, v)
|
table.insert(self.summonResult, v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if self.aniSeq then
|
if self.aniSeq then
|
||||||
@ -445,65 +472,33 @@ function SummonMainUI:onSummonRsp(result, newHero)
|
|||||||
self.vfx02s[i]:setActive(false)
|
self.vfx02s[i]:setActive(false)
|
||||||
end
|
end
|
||||||
if DataManager.SummonData:getSkipAniFlag() then
|
if DataManager.SummonData:getSkipAniFlag() then
|
||||||
self:enableTouch()
|
self:onSummonEnd()
|
||||||
self.uiNode:setActive(true)
|
|
||||||
self.uiSpineObj:setActive(true)
|
|
||||||
self.uiSpineObj:playAnim("idle", true, true)
|
|
||||||
ModuleManager.SummonManager:showSummonRewardUI({
|
|
||||||
rewards = rewards,
|
|
||||||
callback = function(count, isAd)
|
|
||||||
self:onSummon(count, isAd)
|
|
||||||
end,
|
|
||||||
closeCallBack =function ()
|
|
||||||
self:fly()
|
|
||||||
end,
|
|
||||||
newHero = newHero,
|
|
||||||
page = self.page
|
|
||||||
})
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
qlt = qlt - 2
|
qlt = qlt - 2
|
||||||
self.summonResult = rewards
|
|
||||||
self.aniSeq = self.root:createBindTweenSequence()
|
self.aniSeq = self.root:createBindTweenSequence()
|
||||||
if self.vfxs[qlt] then
|
if self.vfxs[qlt] then
|
||||||
self.vfxs[qlt]:setActive(true)
|
self.vfxs[qlt]:setActive(true)
|
||||||
end
|
end
|
||||||
self.aniSeq:AppendInterval(1.5)
|
self.aniSeq:AppendInterval(1.5)
|
||||||
self.aniSeq:AppendCallback(function()
|
self.aniSeq:AppendCallback(function()
|
||||||
self:showHero(1, newHero)
|
self.touchNodeDescTx:setActive(true)
|
||||||
|
self.showIdx = 1
|
||||||
|
self:showHero()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function SummonMainUI:showHero(idx, newHero)
|
function SummonMainUI:showHero()
|
||||||
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)
|
|
||||||
self.vfx02s[i]:setActive(false)
|
|
||||||
end
|
|
||||||
self.heroNode:removeAllChildren()
|
|
||||||
self.uiSpineObj:setActive(true)
|
|
||||||
self.uiSpineObj:playAnim("idle", true, true)
|
|
||||||
ModuleManager.SummonManager:showSummonRewardUI({
|
|
||||||
rewards = self.summonResult,
|
|
||||||
callback = function(count, isAd)
|
|
||||||
self:onSummon(count, isAd)
|
|
||||||
end,
|
|
||||||
closeCallBack =function ()
|
|
||||||
self:fly()
|
|
||||||
end,
|
|
||||||
newHero = newHero,
|
|
||||||
page = self.page
|
|
||||||
})
|
|
||||||
return
|
|
||||||
end
|
|
||||||
for i = 1, 4 do
|
for i = 1, 4 do
|
||||||
|
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)
|
||||||
end
|
end
|
||||||
local id = self.summonResult[idx].item.id
|
if not self.summonResult[self.showIdx] then
|
||||||
|
self:onSummonEnd()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local id = self.summonResult[self.showIdx].item.id
|
||||||
local cfg = DataManager.HeroData:getHeroConfig(id)
|
local cfg = DataManager.HeroData:getHeroConfig(id)
|
||||||
local qlt = cfg.qlt - 2
|
local qlt = cfg.qlt - 2
|
||||||
self.heroNode:removeAllChildren()
|
self.heroNode:removeAllChildren()
|
||||||
@ -523,7 +518,8 @@ function SummonMainUI:showHero(idx, newHero)
|
|||||||
spineObject:setActive(true)
|
spineObject:setActive(true)
|
||||||
end, 0.25)
|
end, 0.25)
|
||||||
self:performWithDelayGlobal(function()
|
self:performWithDelayGlobal(function()
|
||||||
self:showHero(idx + 1, newHero)
|
self.showIdx = self.showIdx + 1
|
||||||
|
self:showHero()
|
||||||
end, 1)
|
end, 1)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
@ -544,7 +540,6 @@ function SummonMainUI:fly()
|
|||||||
if i == 4 then
|
if i == 4 then
|
||||||
GFunc.doScaleFlyImg(self.btnShop)
|
GFunc.doScaleFlyImg(self.btnShop)
|
||||||
self:refreshShopItem()
|
self:refreshShopItem()
|
||||||
self:enableTouch()
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user