Fixed a bug where state machines and auto play audio on awake fucked me
This commit is contained in:
@@ -255,8 +255,23 @@ public class AudioManager : MonoBehaviour, IPausable
|
||||
private void InterruptAudioSource(AppleAudioSource newAudioSource)
|
||||
{
|
||||
wasInterrupted = true;
|
||||
currentlyPlayingVO.InterruptAudio(newAudioSource.name);
|
||||
//currentlyPlayingVO.InterruptAudio(newAudioSource.name);
|
||||
InterruptAllVOSources();
|
||||
ResetAudioSource();
|
||||
currentlyPlayingVO = newAudioSource;
|
||||
}
|
||||
|
||||
private void InterruptAllVOSources()
|
||||
{
|
||||
foreach (AppleAudioSource source in criticalVOSources)
|
||||
{
|
||||
source.InterruptAudio("GlobalInterrupt");
|
||||
|
||||
}
|
||||
foreach (AppleAudioSource source in VOSources)
|
||||
{
|
||||
source.InterruptAudio("GlobalInterrupt");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user