void Update() { if (idle) { idleTimer += Time.deltaTime; if (idleTimer > nextIdleTime) { idleTimer = 0; nextIdleTime = Random.Range(idleWaitTimeMin, idleWaitTimeMax); idleSounds.PlayRandomSound(ref source); } } }
public void Attack() { attackSounds.PlayRandomSound(ref source); }