1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-19 05:22:57 +08:00
osu-lazer/osu.Game/Rulesets/UI/Scrolling/Visualisers/ISpeedChangeVisualiser.cs

33 lines
2.0 KiB
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Collections.Generic;
using osu.Game.Rulesets.Objects.Drawables;
using OpenTK;
namespace osu.Game.Rulesets.UI.Scrolling.Visualisers
{
public interface ISpeedChangeVisualiser
{
/// <summary>
2018-04-20 13:22:48 +08:00
/// Computes the states of <see cref="DrawableHitObject"/>s that remain constant while scrolling, such as lifetime and spatial length.
2018-04-13 17:19:50 +08:00
/// This is invoked once whenever <paramref name="timeRange"/> or <paramref name="length"/> changes.
/// </summary>
/// <param name="hitObjects">The <see cref="DrawableHitObject"/>s whose states should be computed.</param>
/// <param name="direction">The scrolling direction.</param>
2018-04-20 13:22:48 +08:00
/// <param name="timeRange">The duration required to scroll through one length of the screen before any speed adjustments.</param>
2018-04-13 17:19:50 +08:00
/// <param name="length">The length of the screen that is scrolled through.</param>
void ComputeInitialStates(IEnumerable<DrawableHitObject> hitObjects, ScrollingDirection direction, double timeRange, Vector2 length);
/// <summary>
2018-04-20 13:22:48 +08:00
/// Updates the positions of <see cref="DrawableHitObject"/>s, depending on the current time. This is invoked once per frame.
2018-04-13 17:19:50 +08:00
/// </summary>
2018-04-20 13:22:48 +08:00
/// <param name="hitObjects">The <see cref="DrawableHitObject"/>s whose positions should be computed.</param>
2018-04-13 17:19:50 +08:00
/// <param name="direction">The scrolling direction.</param>
/// <param name="currentTime">The current time.</param>
2018-04-20 13:22:48 +08:00
/// <param name="timeRange">The duration required to scroll through one length of the screen before any speed adjustments.</param>
2018-04-13 17:19:50 +08:00
/// <param name="length">The length of the screen that is scrolled through.</param>
2018-04-20 13:22:48 +08:00
void UpdatePositions(IEnumerable<DrawableHitObject> hitObjects, ScrollingDirection direction, double currentTime, double timeRange, Vector2 length);
2018-04-13 17:19:50 +08:00
}
}