/// <summary> /// Ball hitting sound /// </summary> public void PlaybackBall(int index, float velocity) { if (lastPlaybackBallTime + 0.25 < Time.timeSinceLevelLoad) { velocity = Mathf.Min(velocity, 1.0f); atomSourceBall.SetAisac(0, velocity); atomSourceBall.Play(index); lastPlaybackBallTime = Time.timeSinceLevelLoad; lastVelocity = velocity; } }