public void PlayWithBallSource(ColorType colorType) { if (previousBallColorType.Equals(colorType)) { if (ballSoundChangeCounter < 3) { ballSoundChangeCounter++; } } else { ballSoundChangeCounter = 0; } previousBallColorType = colorType; ballSource.PlayOneShot(ballShootClips[ballSoundChangeCounter]); }