【关卡】添加剧情关卡
parent
58ce5ad4d8
commit
8a960ece3b
|
|
@ -419,9 +419,6 @@ function FightPointPassMainPanel:OnShow()
|
||||||
-- 调用onshow
|
-- 调用onshow
|
||||||
invadeMonster:OnShow()
|
invadeMonster:OnShow()
|
||||||
|
|
||||||
if not hasLoad then
|
|
||||||
timePressStarted = Time.realtimeSinceStartup
|
|
||||||
isAnimActive = false
|
|
||||||
local curName = GetLanguageStrById(fightLevelConfig[FightPointPassManager.curOpenFight].Name)
|
local curName = GetLanguageStrById(fightLevelConfig[FightPointPassManager.curOpenFight].Name)
|
||||||
local curDifficulty = fightLevelConfig[FightPointPassManager.curOpenFight].Difficulty
|
local curDifficulty = fightLevelConfig[FightPointPassManager.curOpenFight].Difficulty
|
||||||
local chapterId = 0
|
local chapterId = 0
|
||||||
|
|
@ -439,6 +436,11 @@ function FightPointPassMainPanel:OnShow()
|
||||||
end
|
end
|
||||||
this.chapterName.text = GetLanguageStrById(fightLevelSetConfig[chapterId].Name)
|
this.chapterName.text = GetLanguageStrById(fightLevelSetConfig[chapterId].Name)
|
||||||
|
|
||||||
|
|
||||||
|
if not hasLoad then
|
||||||
|
timePressStarted = Time.realtimeSinceStartup
|
||||||
|
isAnimActive = false
|
||||||
|
|
||||||
-- 奖励预览
|
-- 奖励预览
|
||||||
this.IntiReward()
|
this.IntiReward()
|
||||||
-- 刷新关卡按钮状态
|
-- 刷新关卡按钮状态
|
||||||
|
|
@ -694,12 +696,24 @@ function this.ExcuteBattle()
|
||||||
PopupTipPanel.ShowTip(tip)
|
PopupTipPanel.ShowTip(tip)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
-- 判断是否是剧情节点
|
||||||
|
if fightLevelConfig[curFightId].StoryId > 0 then
|
||||||
|
StoryManager.EventTrigger(fightLevelConfig[curFightId].StoryId, function()
|
||||||
|
FightPointPassManager.ExecuteFightStory(curFightId, function(drop)
|
||||||
|
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1, function()
|
||||||
|
this:OnShow()
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
else
|
||||||
-- 检测是否有前置引导
|
-- 检测是否有前置引导
|
||||||
GuideManager.BeforeFightCheck(curFightId, function()
|
GuideManager.BeforeFightCheck(curFightId, function()
|
||||||
this.SetInitAnim()
|
this.SetInitAnim()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function FightPointPassMainPanel:OnSortingOrderChange()
|
function FightPointPassMainPanel:OnSortingOrderChange()
|
||||||
invadeMonster:OnSortingOrderChange()
|
invadeMonster:OnSortingOrderChange()
|
||||||
|
|
|
||||||
|
|
@ -352,6 +352,17 @@ function this.ExecuteFightBattle(monsterGroupId, fightId, callBack)
|
||||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.STORY_FIGHT, callBack, fightId)
|
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.STORY_FIGHT, callBack, fightId)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
-- 剧情关卡
|
||||||
|
function this.ExecuteFightStory(fightId, func)
|
||||||
|
NetManager.LevelStarFightDataRequest("", fightId, function (msg)
|
||||||
|
NetManager.MapFightResultRequest(10000, "", fightId, BATTLE_TYPE.STORY_FIGHT, function (msg)
|
||||||
|
-- this.lastBattleResult.drop = msg.enventDrop
|
||||||
|
if func then
|
||||||
|
func(msg.enventDrop)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
-- 获取当前章节数
|
-- 获取当前章节数
|
||||||
function this.GetCurChapterIndex()
|
function this.GetCurChapterIndex()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue