bug和引导

This commit is contained in:
xiekaidong 2023-04-21 19:48:08 +08:00
parent 5982d0083a
commit 806ab5170f
6 changed files with 50 additions and 19 deletions

View File

@ -1,14 +1,14 @@
local fx = { local fx = {
[100000]={ [100000]={
["res"]="sfx_m10001_b01", ["res"]="sfx_m10001_b01_01",
["bind"]="root" ["bind"]="root"
}, },
[100001]={ [100001]={
["res"]="sfx_m10001_b02", ["res"]="sfx_m10001_b01_02",
["bind"]="root" ["bind"]="root"
}, },
[100002]={ [100002]={
["res"]="sfx_m10001_b03", ["res"]="sfx_m10001_b01_03",
["bind"]="root" ["bind"]="root"
}, },
[100003]={ [100003]={

View File

@ -5,15 +5,15 @@ local tutorial_start = {
}, },
[2]={ [2]={
["start_id"]=20000, ["start_id"]=20000,
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab" ["uires_path"]="assets/prefabs/ui/main_city/main_ui.prefab"
}, },
[3]={ [3]={
["start_id"]=30000, ["start_id"]=30000,
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab" ["uires_path"]="assets/prefabs/ui/main_city/main_ui.prefab"
}, },
[4]={ [4]={
["start_id"]=40000, ["start_id"]=40000,
["uires_path"]="Assets/prefabs/ui/main_city/main_ui.prefab" ["uires_path"]="assets/prefabs/ui/main_city/main_ui.prefab"
} }
} }
local config = { local config = {

View File

@ -399,7 +399,11 @@ function BattleController:enterEliminationBegin()
end end
function BattleController:enterElimination() function BattleController:enterElimination()
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION if self.battleData:useAddlvCount() then
ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList())
else
self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_ELIMINATION
end
end end
function BattleController:enterAtkStep() function BattleController:enterAtkStep()
@ -490,14 +494,10 @@ function BattleController:enterRoundEnd()
end end
function BattleController:onRoundEnd(toNextWave) function BattleController:onRoundEnd(toNextWave)
if self.battleData:useAddlvCount() then if toNextWave then
ModuleManager.BattleManager:showSelectSkillUI(self:getRandomSkillList()) self:enterNextWave()
else else
if toNextWave then self:enterRoundBegin()
self:enterNextWave()
else
self:enterRoundBegin()
end
end end
end end
@ -1439,7 +1439,7 @@ function BattleController:onSelectSkill(skillId, value)
entity:gotUpSKill(skillId) entity:gotUpSKill(skillId)
end end
self:onRoundEnd() self:enterElimination()
if self.battleUI then if self.battleUI then
self.battleUI:refreshBoard() self.battleUI:refreshBoard()

View File

@ -29,6 +29,7 @@ function TutorialManager:sendTutorialId(id, callback)
end end
function TutorialManager:sendTutorialIdFinish(result) function TutorialManager:sendTutorialIdFinish(result)
Logger.printTable(result)
if result.status == 0 then if result.status == 0 then
if result.id then if result.id then
-- BIReport:postTutorialStep(result.id) -- BIReport:postTutorialStep(result.id)
@ -217,10 +218,12 @@ end
function TutorialManager:showFuncTutorial(id) function TutorialManager:showFuncTutorial(id)
self:sendTutorialId(id, function(success) self:sendTutorialId(id, function(success)
Logger.logHighlight(success)
if success then if success then
if not DataManager.TutorialData:getIsFuncTutorialFinished(id) then if not DataManager.TutorialData:getIsFuncTutorialFinished(id) then
DataManager.TutorialData:markFuncTutorialFinish(id) DataManager.TutorialData:markFuncTutorialFinish(id)
local uires = DataManager.TutorialData:getTutorialId2UIPath(id) local uires = DataManager.TutorialData:getTutorialId2UIPath(id)
Logger.logHighlight(uires)
if uires == nil or uires == "" then if uires == nil or uires == "" then
self:showTutorial() self:showTutorial()
else else

View File

@ -297,10 +297,10 @@ function MainCityUI:checkMainPop()
-- end -- end
-- end -- end
-- -- 引导 -- 引导
-- if self:checkTutorial() then if self:checkTutorial() then
-- return return
-- end end
end end
-- 检查引导 -- 检查引导
@ -318,6 +318,25 @@ function MainCityUI:checkTutorial()
-- return -- return
-- end -- end
-- end -- end
Logger.logHighlight(DataManager.ChapterData:getMaxChapterId())
if DataManager.ChapterData:getMaxChapterId() == 1 then
if ModuleManager.TutorialManager:checkFuncTutorial(GConst.TutorialConst.PASS_ONE_CHAPTER) then
return
end
end
if DataManager.ChapterData:boxCanGet(2, 1) then
if ModuleManager.TutorialManager:checkFuncTutorial(GConst.TutorialConst.TWO_CHAPTER_BOX_CAN_GOT) then
return
end
end
if DataManager.ChapterData:getMaxChapterId() == 3 then
if ModuleManager.TutorialManager:checkFuncTutorial(GConst.TutorialConst.PASS_THREE_CHAPTER) then
return
end
end
end end
return MainCityUI return MainCityUI

View File

@ -132,6 +132,15 @@ function ChapterData:getChapterBoxRewardGot(chapterId, index)
return false return false
end end
function ChapterData:boxCanGet(chapterId, index)
if self:getChapterBoxRewardGot(chapterId, index) then
return false
end
local needWave = DataManager.ChapterData:getChapterBoxNum(chapterId, index)
local curMaxWave = DataManager.ChapterData:getChapterMaxWave(chapterId)
return needWave <= curMaxWave
end
function ChapterData:getChapterBoxRewards(chapterId, index) function ChapterData:getChapterBoxRewards(chapterId, index)
chapterId = chapterId or self:getChapterId() chapterId = chapterId or self:getChapterId()
if not self:getChapterBoxNum(chapterId, index) then if not self:getChapterBoxNum(chapterId, index) then