Example #1
0
        public void StopAllSounds()
        {
            awaitingSlots.Clear();

            for (int i = 0; i < playingSources.Count; i++)
            {
                AudioSource     source = playingSources[i];
                CoroutineRunner runner = source.GetComponent <CoroutineRunner>();
                Assert.IsFalse(runner == null, "Trying to stop sound from invalid source");
                runner.StopAllCoroutines();

                source.Stop();
                AddSingleSource(ref source, ref availableSources);
            }

            playingSources.Clear();
        }
Example #2
0
 public void WillLeaveState()
 {
     runner.StopAllCoroutines();
     OnLeaveState();
 }