From e9054d677d2633f4f4db64610e3fab7267ce3334 Mon Sep 17 00:00:00 2001 From: Oliver Wong Date: Fri, 3 Apr 2026 14:30:45 +0800 Subject: [PATCH] refactor: Remove pitch parameter from PlayAfterDelay coroutine --- Assets/Scripts/OCES/Audio/HandWritten/SfxSystem.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/OCES/Audio/HandWritten/SfxSystem.cs b/Assets/Scripts/OCES/Audio/HandWritten/SfxSystem.cs index cd35e50..d307afd 100644 --- a/Assets/Scripts/OCES/Audio/HandWritten/SfxSystem.cs +++ b/Assets/Scripts/OCES/Audio/HandWritten/SfxSystem.cs @@ -197,7 +197,7 @@ namespace OCES.Audio this.m_activeSounds.Add(active); IncrementClipCount(audioObject.Id); - active.Coroutine = StartCoroutine(PlayAfterDelay(active, audioObject, pitch)); + active.Coroutine = StartCoroutine(PlayAfterDelay(active, audioObject)); return; } @@ -264,13 +264,12 @@ namespace OCES.Audio source.Play(); } - IEnumerator PlayAfterDelay(ActiveSound active, AudioObject audioObject, float pitch) + IEnumerator PlayAfterDelay(ActiveSound active, AudioObject audioObject) { Debug.Log($"Delaying for {audioObject.InitialDelay} second(s)."); yield return new WaitForSeconds(audioObject.InitialDelay); if (!this.m_activeSounds.Contains(active)) yield break; - active.Pitch = pitch; ExecutePlay(active, isRegistered: true); }