diff --git a/Assets/ManagedResources/Audio/UI/voice/story_foot_1_1.mp3 b/Assets/ManagedResources/Audio/UI/voice/story_foot_1_1.mp3 index 622a74ffac..411be8421c 100644 Binary files a/Assets/ManagedResources/Audio/UI/voice/story_foot_1_1.mp3 and b/Assets/ManagedResources/Audio/UI/voice/story_foot_1_1.mp3 differ diff --git a/Assets/ManagedResources/Audio/UI/voice/story_foot_1_2.mp3 b/Assets/ManagedResources/Audio/UI/voice/story_foot_1_2.mp3 index 6591aa91c2..416bf2b87c 100644 Binary files a/Assets/ManagedResources/Audio/UI/voice/story_foot_1_2.mp3 and b/Assets/ManagedResources/Audio/UI/voice/story_foot_1_2.mp3 differ diff --git a/Assets/ManagedResources/Audio/UI/voice/story_voice_1_2.mp3 b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_2.mp3 index 215fef7f6c..50f8de47ea 100644 Binary files a/Assets/ManagedResources/Audio/UI/voice/story_voice_1_2.mp3 and b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_2.mp3 differ diff --git a/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3 b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3 new file mode 100644 index 0000000000..ec8197e506 Binary files /dev/null and b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3 differ diff --git a/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3.meta b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3.meta new file mode 100644 index 0000000000..a3d1ae3f92 --- /dev/null +++ b/Assets/ManagedResources/Audio/UI/voice/story_voice_1_5.mp3.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: f3359af4523db604aa29b5b5594b0154 +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: diff --git a/Assets/ManagedResources/Audio/UI/voice/story_voice_2_2.mp3 b/Assets/ManagedResources/Audio/UI/voice/story_voice_2_2.mp3 index 7608c749a9..ef1165bb1e 100644 Binary files a/Assets/ManagedResources/Audio/UI/voice/story_voice_2_2.mp3 and b/Assets/ManagedResources/Audio/UI/voice/story_voice_2_2.mp3 differ diff --git a/Assets/ManagedResources/~Lua/Data/SoundData.lua b/Assets/ManagedResources/~Lua/Data/SoundData.lua index 685b54dad4..cbd5eeb289 100644 --- a/Assets/ManagedResources/~Lua/Data/SoundData.lua +++ b/Assets/ManagedResources/~Lua/Data/SoundData.lua @@ -86,9 +86,10 @@ SoundConfig = { STORY_FOOT_1_1 = "story_foot_1_1", --玩家脚步声 STORY_FOOT_1_2 = "story_foot_1_2", --怪物脚步声 STORY_VOICE_1_1 = "story_voice_1_1", --怪物向上一格,符咒闪烁了一下。 - STORY_VOICE_1_2 = "story_voice_1_2", --点击揭下符咒的声音 + STORY_VOICE_1_2 = "story_voice_1_2", --符咒闪烁的声音 STORY_VOICE_1_3 = "story_voice_1_3", --金箍棒砸在主角和怪物中间。 STORY_VOICE_1_4 = "story_voice_1_4", --震退一步 + STORY_VOICE_1_5 = "story_voice_1_5", --点击揭下符咒的声音 STORY_VOICE_2_1 = "story_voice_2_1", --随着光芒闪烁,一把从天而降的神剑插在了一只怪物面前 光芒闪烁 STORY_VOICE_2_2 = "story_voice_2_2", --一把从天而降的神剑插在了一只怪物面前 数把飞剑在主角身边依次落下,将身边一圈的怪物都扎死在剑下 STORY_VOICE_2_3 = "story_voice_2_3", --随后剑放出光芒,形成环绕主角的法阵 法阵 diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index ed0b029163..a97b10d080 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -263,7 +263,7 @@ end --绑定事件(用于子类重写) function this:BindEvent() Util.AddOnceClick(this.btnEndLess,function() - StoryMapManager.InitData(3) + StoryMapManager.InitData(1) end) self.trigger = Util.GetEventTriggerListener(self.ctrl) diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua index 4ad945838a..7a00218691 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua @@ -63,7 +63,11 @@ function StoryMapPanel:BindEvent() end) Util.AddClick(this.maskBtn, function () this.mask.gameObject:SetActive(false) - SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_2) + if self.SoundTime1_2 then + self.SoundTime1_2:Stop() + self.SoundTime1_2 = nil + end + SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_5) this:StackPop() end) end @@ -135,6 +139,7 @@ function this.LoadMap() end function StoryMapPanel:OnShow() + SoundManager.StopMusic() if not curGroupConfig.TriggerEvent or #curGroupConfig.TriggerEvent < 1 then return end @@ -404,6 +409,15 @@ function this:CheckTrigger(data,go) Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_06,newSortingOrder - sortingOrder) this.UI_Effect_ChuFaEffect_06.gameObject:SetActive(true) this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(true) + if self.SoundTime1_2 then + self.SoundTime1_2:Stop() + self.SoundTime1_2 = nil + end + SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_2) + self.SoundTime1_2 = Timer.New(function() + SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_2) + end,1,-1,false) + self.SoundTime1_2:Start() elseif data.eventType == 12 then --光芒四射的特效 --设置上一个特效为false if this.UI_Effect_ChuFaEffect_06 then @@ -667,6 +681,10 @@ function StoryMapPanel:OnClose() poolManager:UnLoadAsset("UI_Effect_ChuFaEffect_07", this.UI_Effect_ChuFaEffect_05, PoolManager.AssetType.GameObject) this.UI_Effect_ChuFaEffect_07 = nil end + if self.SoundTime1_2 then + self.SoundTime1_2:Stop() + self.SoundTime1_2 = nil + end end --界面销毁时调用(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua b/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua index 4044972a57..55f641b368 100644 --- a/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua +++ b/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua @@ -183,19 +183,19 @@ function SingleStoryPlayerView:RunMap(isSetRoleDir) self:StackPop() end function SingleStoryPlayerView:PlayStepSound(indexType,isSetRoleDir) - -- local curTimeStamp = GetTimeStamp() - -- if curTimeStamp - self._PlayTimeStamp >= 0.1 then - -- self._PlayTimeStamp = curTimeStamp - -- if indexType == 0 then - -- if isSetRoleDir == 10 then - -- SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_4) - -- else - -- SoundManager.PlaySound(SoundConfig.STORY_FOOT_1_2) - -- end - -- else - -- SoundManager.PlaySound(SoundConfig.STORY_FOOT_1_1) - -- end - -- end + local curTimeStamp = GetTimeStamp() + if curTimeStamp - self._PlayTimeStamp >= 0.5 then + self._PlayTimeStamp = curTimeStamp + if indexType == 0 then + if isSetRoleDir == 10 then + SoundManager.PlaySound(SoundConfig.STORY_VOICE_1_4) + else + SoundManager.PlaySound(SoundConfig.STORY_FOOT_1_2) + end + else + SoundManager.PlaySound(SoundConfig.STORY_FOOT_1_1) + end + end end -- 角色相关 function SingleStoryPlayerView:SetRoleDirAction(pos,go,indexType)