void Update() { if (stop && sound != null) { sound.StopAll(); stop = false; } }
void Update() { if (sound != null) { timer += Time.deltaTime; if (retrigger && timer > retriggerThreshhold) { timer = 0; sound.Play(); } } if (stop) { sound.StopAll(); stop = false; } }