Ejemplo n.º 1
0
    public void PlayNewSound()
    {
        CardSound pair = additional ? AdditionalSounds[soundCount - 1] : InitialSounds[initialSound];

        AudioSource startPlayer = StartPlayers[soundCount];
        AudioSource loopPlayer  = LoopPlayers[soundCount];

        stopFade(startPlayer);
        startPlayer.PlayOneShot(pair.Start);

        stopFade(loopPlayer);
        loopPlayer.clip = pair.Loop;
        loopPlayer.PlayScheduled(AudioSettings.dspTime + pair.Start.length);

        soundCount++;
        if (!additional)
        {
            additional = true;
        }
    }
Ejemplo n.º 2
0
 public void PlayCardSound()
 {
     CardSound.Play();
 }