Exemple #1
0
 public Sfx ApplyEffect( Sfx sfx )
 {
     sfx.GetComponent<AudioSource>().pitch = -sfx.GetComponent<AudioSource>().pitch;
     if(sfx.GetComponent<AudioSource>().pitch < 0)
         sfx.GetComponent<AudioSource>().time = sfx.GetComponent<AudioSource>().clip.length;
     return sfx;
 }
Exemple #2
0
 public Sfx ApplyEffect( Sfx sfx )
 {
     sfx.GetComponent<AudioSource>().pitch = Mathf.Lerp(min, max, scalar);
     return sfx;
 }
Exemple #3
0
 public Sfx ApplyEffect( Sfx sfx )
 {
     sfx.GetComponent<AudioSource>().pitch = Random.Range(min, max);
     return sfx;
 }