【跳过战斗优化】主线战斗中的BOSS关卡,改为不允许跳过 + 战斗背景音乐替换

dev_chengFeng
zhangqiang 2021-05-18 17:18:52 +08:00
parent a40ec43b81
commit 2703f3e4f2
7 changed files with 38 additions and 59 deletions

View File

@ -1,43 +0,0 @@
fileFormatVersion: 2
guid: 61dd371444233d341ae6297a19c91c0d
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides:
1:
loadType: 2
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
4:
loadType: 2
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
7:
loadType: 2
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName: lz4/audio/bgm/bgm_019
assetBundleVariant: unity3d

Binary file not shown.

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: fb00b7acef3636c4cb1c3e34f538c0ce
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -268,9 +268,9 @@ function this:OnOpen()
}
this.InitPanelData()
SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false)
end)
-- end)
this.SkillOption:GetComponent("Canvas").sortingOrder = BattleManager.GetBattleSorting() + 20

View File

@ -19,7 +19,7 @@ local boxList2={}--踏碎凌霄奖励盒子
-- 显示跳过战斗使用
local hadCounted = 0
local IsUnLockBattlePass
local UpdateBtnGMFunc = {
[-1] = function()
return BattleManager.IsUnlockBattlePass()
@ -120,7 +120,11 @@ function this:BindEvent()
end)
Util.AddClick(this.ButtonLock, function ()
PopupTipPanel.ShowTip(Language[12237])
if not IsUnLockBattlePass then
PopupTipPanel.ShowTip(Language[12237])
elseif fightType == BATTLE_TYPE.STORY_FIGHT and FightPointPassManager.GetCurOpenFightIdIsBoss() then--关卡特殊判断 首领阶段不能跳过按钮 置灰 提示 首领关卡不允许跳过!
PopupTipPanel.ShowTip("首领关卡不允许跳过!")
end
end)
local pauseTime = 31
@ -203,12 +207,8 @@ function this:BindEvent()
Util.AddClick(this.BtnGM, function ()
if BattleManager.IsCanOperate() and not BattleLogic.IsEnd then
if fightType == BATTLE_TYPE.STORY_FIGHT and FightPointPassManager.GetCurOpenFightIdIsBoss() then--关卡特殊判断 首领阶段不能跳过按钮 置灰 提示 首领关卡不允许跳过!
PopupTipPanel.ShowTip("首领关卡不允许跳过!")
else
BattleView.EndBattle()
BattleLogic.IsEnd = true
end
BattleView.EndBattle()
BattleLogic.IsEnd = true
end
end)
@ -268,9 +268,9 @@ function this:OnOpen(_fightData, _fightType, _endFunc, _guideType)
this.BtnExit:SetActive(false)--FightPointPassManager.GetStopBtnState())
SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false)
end)
-- end)
this.fightResult = nil
@ -399,7 +399,7 @@ function this.InitOption()
this.Option:SetActive(true)
Util.GetGameObject(this.BtnTimeScale, "lock"):SetActive(not BattleManager.IsUnlockBattleSpeed())
local IsUnLockBattlePass
if UpdateBtnGMFunc[fightType] then
IsUnLockBattlePass = UpdateBtnGMFunc[fightType]()
else
@ -412,7 +412,7 @@ function this.InitOption()
Util.GetGameObject(this.BtnGM, "lock"):SetActive(not IsUnLockBattlePass)
this.BtnGM:GetComponent("Button").interactable = IsUnLockBattlePass
end
if fightType == BATTLE_TYPE.STORY_FIGHT and IsUnLockBattlePass then--关卡特殊判断 首领阶段不能跳过按钮 置灰 提示 首领关卡不允许跳过!
if fightType == BATTLE_TYPE.STORY_FIGHT then--关卡特殊判断 首领阶段不能跳过按钮 置灰 提示 首领关卡不允许跳过!
Util.GetGameObject(this.BtnGM, "lock"):SetActive(FightPointPassManager.GetCurOpenFightIdIsBoss())
end

View File

@ -94,9 +94,9 @@ function this:OnOpen(_fightData, _endFunc, guideType)
this.BtnTimeScale:SetActive(false)
this.damagePanel:SetActive(false)
SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
-- SoundManager.PlayMusic(SoundConfig.BGM_Battle_1, true, function()
SoundManager.PlayMusic(SoundConfig.BGM_Battle_2, false)
end)
-- end)
this.fightResult = nil