【假战斗】剧情添加跳过
parent
cde26e679b
commit
6569aaaf08
|
@ -53,7 +53,7 @@ end
|
||||||
--绑定事件(用于子类重写)
|
--绑定事件(用于子类重写)
|
||||||
function StoryDialoguePanel:BindEvent()
|
function StoryDialoguePanel:BindEvent()
|
||||||
Util.AddClick(this.btnNext, function ()
|
Util.AddClick(this.btnNext, function ()
|
||||||
local isEnd = OpConfig[optionID].JumpType == 4
|
local isEnd = OpConfig[optionID].JumpType == 4
|
||||||
if isEnd and static_callBack then
|
if isEnd and static_callBack then
|
||||||
static_callBack()
|
static_callBack()
|
||||||
static_callBack = nil
|
static_callBack = nil
|
||||||
|
@ -126,12 +126,7 @@ function this.RefreshPanel(eventId, isFirstOpen)
|
||||||
this.RoleName.gameObject:SetActive(isRightType)
|
this.RoleName.gameObject:SetActive(isRightType)
|
||||||
this.btnNext: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 showValues = GetLanguageStrById(chapterEventPointData[eventId].ShowValues)
|
||||||
local options = chapterEventPointData[eventId].Option
|
local options = chapterEventPointData[eventId].Option
|
||||||
local dir = chapterEventPointData[eventId].ShowDir
|
local dir = chapterEventPointData[eventId].ShowDir
|
||||||
|
@ -140,6 +135,17 @@ function this.RefreshPanel(eventId, isFirstOpen)
|
||||||
local showMask = chapterEventPointData[eventId].Isdark == 1
|
local showMask = chapterEventPointData[eventId].Isdark == 1
|
||||||
this.mask:SetActive(showMask)
|
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
|
local bgName = chapterEventPointData[eventId].DialogueBg
|
||||||
if not bgName or bgName == "" then
|
if not bgName or bgName == "" then
|
||||||
|
@ -154,7 +160,8 @@ function this.RefreshPanel(eventId, isFirstOpen)
|
||||||
optionID = options[1]
|
optionID = options[1]
|
||||||
jumpId = chapterEventPointData[eventId].NextOptPanelId
|
jumpId = chapterEventPointData[eventId].NextOptPanelId
|
||||||
if jumpId and jumpId ~= 0 then
|
if jumpId and jumpId ~= 0 then
|
||||||
jumpId = chapterEventPointData[jumpId].Option[1]
|
-- jumpId = chapterEventPointData[jumpId].Option[1]
|
||||||
|
jumpId = options[2]
|
||||||
else
|
else
|
||||||
jumpId = 0
|
jumpId = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,6 +37,7 @@ function this.EventTrigger(eventId, callBack)
|
||||||
local options = chapterDataConfig[eventId].Option
|
local options = chapterDataConfig[eventId].Option
|
||||||
|
|
||||||
if showType and showValues and options then
|
if showType and showValues and options then
|
||||||
|
LogError("showtype "..showType.." showvalue "..showValues)
|
||||||
-- 如果是第一次打开,则打开开幕界面
|
-- 如果是第一次打开,则打开开幕界面
|
||||||
if showType == 11 then -- 对话界面
|
if showType == 11 then -- 对话界面
|
||||||
if callBack then
|
if callBack then
|
||||||
|
@ -59,9 +60,9 @@ function this.EventTrigger(eventId, callBack)
|
||||||
}
|
}
|
||||||
UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
|
UIManager.OpenPanel(UIName.GuideBattlePanel, testFightData, function()
|
||||||
StoryManager.EventTrigger(300017, function ()
|
StoryManager.EventTrigger(300017, function ()
|
||||||
PatFaceManager.isLogin = true
|
-- PatFaceManager.isLogin = true
|
||||||
UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
-- UIManager.OpenPanel(UIName.FightPointPassMainPanel)
|
||||||
LoadingPanel.End()
|
-- LoadingPanel.End()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
elseif showType == 15 then -- 播放转场特效
|
elseif showType == 15 then -- 播放转场特效
|
||||||
|
@ -107,7 +108,20 @@ function this.StoryJumpType(optionId, panel)
|
||||||
if UIManager.IsOpen(UIName.StoryDialoguePanel) then
|
if UIManager.IsOpen(UIName.StoryDialoguePanel) then
|
||||||
UIManager.ClosePanel(UIName.StoryDialoguePanel)
|
UIManager.ClosePanel(UIName.StoryDialoguePanel)
|
||||||
end
|
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 -- 继续对话,往下跳转
|
elseif jumpType == 1 then -- 继续对话,往下跳转
|
||||||
local nextEventId = chapterOptionData[optionId].JumpTypeValues
|
local nextEventId = chapterOptionData[optionId].JumpTypeValues
|
||||||
local nextEventShowType = chapterDataConfig[nextEventId].ShowType
|
local nextEventShowType = chapterDataConfig[nextEventId].ShowType
|
||||||
|
|
Loading…
Reference in New Issue