/// <summary> /// Sets the stickyness. /// </summary> /// <param name="index">Level of stickiness.</param> public void SetStickyness(int index) { index = Mathf.Clamp(index, 0, stickyStages.Length - 1); // Set our stickiness and update speed/collider for the new stage stickyness = stickyStages[index].stickiness; multiplier = stickyStages[index].speedMultiplier; myCollider.radius = baseRadius + stickyStages[index].radiusIncrease; collisionOffset = stickyStages[index].pickupDistanceScale; // Change audio for new stage pickupSource = AudioHelper.CreateAudioSource(gameObject, stickyStages[index].collectSound); ChangeMovementSound(); }