|
@@ -97,7 +97,11 @@ namespace KairoEngine.SoundtrackSystem
|
|
|
instance.SwitchAudioSource();
|
|
|
instance.Play(soundtrack, instance.currentAudioSourceIndex);
|
|
|
if(soundtrack.fadeIn) instance.StartCoroutine(SoundtrackManager.StartFade(instance.currentAudioSourceIndex, soundtrack.fadeTime, 1f, false));
|
|
|
- else instance.audioSource1.volume = 1f;
|
|
|
+ else
|
|
|
+ {
|
|
|
+ if(instance.currentAudioSourceIndex == 1) instance.audioSource1.volume = 1f;
|
|
|
+ else if(instance.currentAudioSourceIndex == 2) instance.audioSource2.volume = 1f;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public static void FadeOutSoundtrack(float time = 1f)
|