Can now trigger audio emitters through scripts

This commit is contained in:
Antoine Pilote
2023-09-23 16:18:11 -04:00
parent a4724e2a91
commit 79a9265dc6
6 changed files with 66 additions and 17 deletions

View File

@@ -19,6 +19,8 @@ namespace Nuake
bool AudioSystem::Init()
{
AudioManager::Get().StopAll();
return true;
}
@@ -76,7 +78,8 @@ namespace Nuake
audioManager.UpdateVoice(audioRequest);
}
}
else if (isPlaying)
if (isPlaying)
{
// Reset the play status to false since the audio has been fired
if (!audioEmitterComponent.Loop)
@@ -104,6 +107,6 @@ namespace Nuake
void AudioSystem::Exit()
{
AudioManager::Get().StopAll();
}
}