【假战斗】剧情添加跳过

dev_chengFeng
wangzhenxing 2021-03-18 20:53:46 +08:00
parent cde26e679b
commit 6569aaaf08
2 changed files with 33 additions and 12 deletions

View File

@ -53,7 +53,7 @@ end
--绑定事件(用于子类重写)
function StoryDialoguePanel:BindEvent()
Util.AddClick(this.btnNext, function ()
local isEnd = OpConfig[optionID].JumpType == 4
local isEnd = OpConfig[optionID].JumpType == 4
if isEnd and static_callBack then
static_callBack()
static_callBack = nil
@ -126,12 +126,7 @@ function this.RefreshPanel(eventId, isFirstOpen)
this.RoleName.gameObject:SetActive(isRightType)
this.btnNext:SetActive(isRightType)
-- 新手隐藏阶段必须隐藏,其他时候随着面板变化
if GuideManager.IsInMainGuide() then
this.jumpRoot:SetActive(false)
else
this.jumpRoot:SetActive(isRightType)
end
local showValues = GetLanguageStrById(chapterEventPointData[eventId].ShowValues)
local options = chapterEventPointData[eventId].Option
local dir = chapterEventPointData[eventId].ShowDir
@ -140,6 +135,17 @@ function this.RefreshPanel(eventId, isFirstOpen)
local showMask = chapterEventPointData[eventId].Isdark == 1
this.mask:SetActive(showMask)
-- 新手隐藏阶段必须隐藏,其他时候随着面板变化
if GuideManager.IsInMainGuide() then
if options[2] then
this.jumpRoot:SetActive(true)
else
this.jumpRoot:SetActive(false)
end
else
this.jumpRoot:SetActive(isRightType)
end
-- 设置对话背景图
local bgName = chapterEventPointData[eventId].DialogueBg
if not bgName or bgName == "" then
@ -154,7 +160,8 @@ function this.RefreshPanel(eventId, isFirstOpen)
optionID = options[1]
jumpId = chapterEventPointData[eventId].NextOptPanelId
if jumpId and jumpId ~= 0 then
jumpId = chapterEventPointData[jumpId].Option[1]
-- jumpId = chapterEventPointData[jumpId].Option[1]
jumpId = options[2]
else
jumpId = 0
end

View File

@ -37,6 +37,7 @@ function this.EventTrigger(eventId, callBack)
local options = chapterDataConfig[eventId].Option
if showType and showValues and options then
LogError("showtype "..showType.." showvalue "..showValues)
-- 如果是第一次打开,则打开开幕界面
if showType == 11 then -- 对话界面
if callBack then
@ -59,9 +60,9 @@ function this.EventTrigger(eventId, callBack)
}
UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
StoryManager.EventTrigger(300017, function ()
PatFaceManager.isLogin = true
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
LoadingPanel.End()
-- PatFaceManager.isLogin = true
-- UIManager.OpenPanel(UIName.FightPointPassMainPanel)
-- LoadingPanel.End()
end)
end)
elseif showType == 15 then -- 播放转场特效
@ -107,7 +108,20 @@ function this.StoryJumpType(optionId, panel)
if UIManager.IsOpen(UIName.StoryDialoguePanel) then
UIManager.ClosePanel(UIName.StoryDialoguePanel)
end
elseif jumpType == 5 then
-- 打开主城
PatFaceManager.isLogin = true
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
LoadingPanel.End()
-- 关闭剧情
if panel then
panel:ClosePanel()
end
if UIManager.IsOpen(UIName.StoryDialoguePanel) then
UIManager.ClosePanel(UIName.StoryDialoguePanel)
end
elseif jumpType == 1 then -- 继续对话,往下跳转
local nextEventId = chapterOptionData[optionId].JumpTypeValues
local nextEventShowType = chapterDataConfig[nextEventId].ShowType