|
|
|
|
|
|
soundEmitters[i].OnSoundFinishedPlaying += OnSoundEmitterFinishedPlaying; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
Debug.LogWarning("Finishing an AudioCue was requested, but the AudioCue was not found."); |
|
|
|
} |
|
|
|
|
|
|
|
return isFound; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
private void StopAndCleanEmitter(SoundEmitter soundEmitter) |
|
|
|
{ |
|
|
|
if (soundEmitter.IsFinishing()) |
|
|
|
if(!soundEmitter.IsLooping()) |
|
|
|
soundEmitter.OnSoundFinishedPlaying -= OnSoundEmitterFinishedPlaying; |
|
|
|
|
|
|
|
soundEmitter.Stop(); |
|
|
|