Example #1
0
    public float Play(FlowerSound sound, float pitchRange = 0f)
    {
        int index = System.Array.FindIndex(sounds, s => s.sound == sound);

        if (index < 0)
        {
            return(0f);
        }

        return(Play(sounds[index].clip));
    }
Example #2
0
 public void PlaySound(FlowerSound sound)
 {
     sounds.Play(sound, 0.1f);
 }