Added comments

This commit is contained in:
Henry Lin 2021-06-29 12:56:05 +08:00
parent 96e09605d8
commit 0c5777c2c8
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,7 @@ public void ApplyToBeatmap(IBeatmap beatmap)
for (int j = i - 1; j >= i - shift_object_count && j >= 0; j--)
{
// only shift hit circles
if (!(hitObjects[j] is HitCircle)) break;
toBeShifted.Add(hitObjects[j]);
@ -184,6 +185,8 @@ private void applyDecreasingShift(IList<OsuHitObject> hitObjects, Vector2 shift)
{
for (int i = 0; i < hitObjects.Count; i++)
{
// The first object is shifted by a vector slightly smaller than shift
// The last object is shifted by a vector slightly larger than zero
Vector2 position = hitObjects[i].Position + shift * ((hitObjects.Count - i) / (float)(hitObjects.Count + 1));
position.X = MathHelper.Clamp(position.X, 0, OsuPlayfield.BASE_SIZE.X);