var nextSound: float=0;var soundStep: float = 0.2;function Update(){ if(Input.GetKey(KeyCode.W)) { if(nextSound< Time.realtimeSinceStartup ) { audio.Play(); nextSound = Time.realtimeSinceStartup + soundStep; } }}