【引导战斗】添加跳过功能
parent
379de4fed0
commit
89f201d8f9
|
@ -54,6 +54,13 @@ function this:BindEvent()
|
|||
BattleRecordManager.SubmitBattleRecord()
|
||||
end, 0.5)
|
||||
|
||||
Util.AddClick(this.BtnGM, function ()
|
||||
if BattleManager.IsCanOperate() and not BattleLogic.IsEnd then
|
||||
BattleView.EndBattle()
|
||||
BattleLogic.IsEnd = true
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
|
@ -81,7 +88,7 @@ function this:OnOpen(_fightData, _endFunc, guideType)
|
|||
fightType = BATTLE_TYPE.Test --判定战斗类型
|
||||
this.BG:GetComponent("Image").sprite = Util.LoadSprite(BattleManager.GetBattleBg(fightType))
|
||||
|
||||
this.BtnGM:SetActive(false)
|
||||
this.BtnGM:SetActive(true)
|
||||
this.BtnExit:SetActive(false)
|
||||
this.ButtonLock:SetActive(false)
|
||||
this.BtnTimeScale:SetActive(false)
|
||||
|
|
|
@ -53,27 +53,29 @@ end
|
|||
--绑定事件(用于子类重写)
|
||||
function StoryDialoguePanel:BindEvent()
|
||||
Util.AddClick(this.btnNext, function ()
|
||||
local isEnd = OpConfig[optionID].JumpType == 4
|
||||
if isEnd and static_callBack then
|
||||
static_callBack()
|
||||
static_callBack = nil
|
||||
end
|
||||
|
||||
-- 点击下一步关闭配音音效关闭
|
||||
SoundManager.StopSoundByChannel(10)
|
||||
|
||||
StoryManager.StoryJumpType(optionID, self)
|
||||
self:GoNext(optionID)
|
||||
end)
|
||||
|
||||
Util.AddClick(this.btnJump, function ()
|
||||
if jumpId == 0 then
|
||||
self:ClosePanel()
|
||||
else
|
||||
StoryManager.StoryJumpType(jumpId, self)
|
||||
self:GoNext(jumpId)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function StoryDialoguePanel:GoNext(optionID)
|
||||
local isEnd = OpConfig[optionID].JumpType == 4
|
||||
if isEnd and static_callBack then
|
||||
static_callBack()
|
||||
static_callBack = nil
|
||||
end
|
||||
-- 点击下一步关闭配音音效关闭
|
||||
SoundManager.StopSoundByChannel(10)
|
||||
StoryManager.StoryJumpType(optionID, self)
|
||||
end
|
||||
|
||||
--添加事件监听(用于子类重写)
|
||||
function StoryDialoguePanel:AddListener()
|
||||
|
||||
|
@ -158,13 +160,14 @@ function this.RefreshPanel(eventId, isFirstOpen)
|
|||
|
||||
-- 跳转值
|
||||
optionID = options[1]
|
||||
jumpId = chapterEventPointData[eventId].NextOptPanelId
|
||||
if jumpId and jumpId ~= 0 then
|
||||
-- jumpId = chapterEventPointData[jumpId].Option[1]
|
||||
jumpId = options[2]
|
||||
else
|
||||
jumpId = 0
|
||||
end
|
||||
jumpId = options[2] or 0
|
||||
-- jumpId = chapterEventPointData[eventId].NextOptPanelId
|
||||
-- if jumpId and jumpId ~= 0 then
|
||||
-- -- jumpId = chapterEventPointData[jumpId].Option[1]
|
||||
-- jumpId = options[2]
|
||||
-- else
|
||||
-- jumpId = 0
|
||||
-- end
|
||||
-- 角色信息
|
||||
local contents = string.split(showValues, "|")
|
||||
local resId = tonumber(contents[1])
|
||||
|
|
Loading…
Reference in New Issue