refactor: Remove pitch parameter from PlayAfterDelay coroutine

This commit is contained in:
2026-04-03 14:30:45 +08:00
parent 3d44ac939b
commit fb1225463d
@@ -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);
}