diff --git a/osu.Game/Rulesets/UI/Scrolling/Algorithms/IScrollingAlgorithm.cs b/osu.Game/Rulesets/UI/Scrolling/Algorithms/IScrollingAlgorithm.cs
index f9863bd299..d9e4ab228f 100644
--- a/osu.Game/Rulesets/UI/Scrolling/Algorithms/IScrollingAlgorithm.cs
+++ b/osu.Game/Rulesets/UI/Scrolling/Algorithms/IScrollingAlgorithm.cs
@@ -9,7 +9,25 @@ namespace osu.Game.Rulesets.UI.Scrolling.Algorithms
{
public interface IScrollingAlgorithm
{
+ ///
+ /// Computes the states of s that are constant, such as lifetime and spatial length.
+ /// This is invoked once whenever or changes.
+ ///
+ /// The s whose states should be computed.
+ /// The scrolling direction.
+ /// The duration required to scroll through one length of the screen before any control point adjustments.
+ /// The length of the screen that is scrolled through.
void ComputeInitialStates(IEnumerable hitObjects, ScrollingDirection direction, double timeRange, Vector2 length);
+
+ ///
+ /// Computes the states of s that change depending on , such as position.
+ /// This is invoked once per frame.
+ ///
+ /// The s whose states should be computed.
+ /// The scrolling direction.
+ /// The current time.
+ /// The duration required to scroll through one length of the screen before any control point adjustments.
+ /// The length of the screen that is scrolled through.
void ComputePositions(IEnumerable hitObjects, ScrollingDirection direction, double currentTime, double timeRange, Vector2 length);
}
}
diff --git a/osu.Game/Rulesets/UI/Scrolling/ScrollingHitObjectContainer.cs b/osu.Game/Rulesets/UI/Scrolling/ScrollingHitObjectContainer.cs
index dfa6a40db4..960fd94762 100644
--- a/osu.Game/Rulesets/UI/Scrolling/ScrollingHitObjectContainer.cs
+++ b/osu.Game/Rulesets/UI/Scrolling/ScrollingHitObjectContainer.cs
@@ -15,12 +15,18 @@ namespace osu.Game.Rulesets.UI.Scrolling
{
public class ScrollingHitObjectContainer : HitObjectContainer
{
+ ///
+ /// The duration required to scroll through one length of the before any control point adjustments.
+ ///
public readonly BindableDouble TimeRange = new BindableDouble
{
MinValue = 0,
MaxValue = double.MaxValue
};
+ ///
+ /// The control points that adjust the scrolling speed.
+ ///
protected readonly SortedList ControlPoints = new SortedList();
private readonly ScrollingDirection direction;
@@ -104,9 +110,7 @@ namespace osu.Game.Rulesets.UI.Scrolling
{
base.UpdateAfterChildrenLife();
- // We need to calculate this as soon as possible after lifetimes so that hitobjects
- // get the final say in their positions
-
+ // We need to calculate this as soon as possible after lifetimes so that hitobjects get the final say in their positions
scrollingAlgorithm.ComputePositions(AliveObjects, direction, Time.Current, TimeRange, DrawSize);
}
}