【语音】添加是否播放游戏语音的控制字段
parent
795657a213
commit
3ccf1e6c44
|
@ -8,6 +8,8 @@
|
|||
-- 启用功能引导
|
||||
ENABLE_FUNC_GUIDE = 1 --0关闭1开启
|
||||
RECHARGEABLE = true --false不可充值 true可充值
|
||||
IS_PLAY_VOICE = false -- 是否开启游戏内的语音
|
||||
|
||||
-- 引导类型
|
||||
GuideType = {
|
||||
Force = 1,--强制
|
||||
|
|
|
@ -106,7 +106,7 @@ function SkillCaster:PlaySkillCastingEffect(combat, skill, func)
|
|||
self.castingNameNode:SetActive(false)
|
||||
end
|
||||
-- 技能名音效
|
||||
if combat.SkillNameVoice and GetCurLanguage() == 0 then
|
||||
if IS_PLAY_VOICE and combat.SkillNameVoice and GetCurLanguage() == 0 then
|
||||
SoundManager.PlaySound(combat.SkillNameVoice)
|
||||
end
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ function this.ShowGuide(id)
|
|||
str = string.gsub(str, "}", "</color>")
|
||||
this.desc.text = str
|
||||
end
|
||||
if GuideConfig[id].Audio and GuideConfig[id].Audio ~= "" and GetCurLanguage() == 0 then
|
||||
if IS_PLAY_VOICE and GuideConfig[id].Audio and GuideConfig[id].Audio ~= "" and GetCurLanguage() == 0 then
|
||||
audio = SoundManager.PlaySound(GuideConfig[id].Audio)
|
||||
end
|
||||
PlayUIAnim(this.tipButtomRoot)
|
||||
|
|
|
@ -70,7 +70,7 @@ function DialoguePopup:OnOpen(Id, func)
|
|||
|
||||
-- 配音资源名
|
||||
local voice = chapterDataConfig[Id].VoiceRes
|
||||
if voice then
|
||||
if IS_PLAY_VOICE and voice then
|
||||
-- 使用相同通道播放,避免跳过剧情导致音效重复
|
||||
SoundManager.PlaySound(voice, nil, nil, 10)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue