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; }
public Sfx ApplyEffect( Sfx sfx ) { sfx.GetComponent<AudioSource>().pitch = Mathf.Lerp(min, max, scalar); return sfx; }
public Sfx ApplyEffect( Sfx sfx ) { sfx.GetComponent<AudioSource>().pitch = Random.Range(min, max); return sfx; }