mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Adjust comments
This commit is contained in:
parent
aff275ea21
commit
68ca5cb26a
@ -12,6 +12,9 @@ using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
{
|
||||
/// <summary>
|
||||
/// A single follow point positioned between two adjacent <see cref="DrawableOsuHitObject"/>s.
|
||||
/// </summary>
|
||||
public class FollowPoint : Container
|
||||
{
|
||||
private const float width = 8;
|
||||
|
@ -11,12 +11,18 @@ using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
{
|
||||
/// <summary>
|
||||
/// Visualises the <see cref="FollowPoint"/>s between two <see cref="DrawableOsuHitObject"/>s.
|
||||
/// </summary>
|
||||
public class FollowPointGroup : CompositeDrawable
|
||||
{
|
||||
// Todo: These shouldn't be constants
|
||||
private const int spacing = 32;
|
||||
private const double preempt = 800;
|
||||
|
||||
/// <summary>
|
||||
/// The start time of <see cref="Start"/>.
|
||||
/// </summary>
|
||||
public readonly Bindable<double> StartTime = new Bindable<double>();
|
||||
|
||||
/// <summary>
|
||||
|
@ -9,8 +9,14 @@ using osu.Framework.Graphics.Containers;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
{
|
||||
/// <summary>
|
||||
/// Visualises groups of <see cref="FollowPoint"/>s.
|
||||
/// </summary>
|
||||
public class FollowPointRenderer : CompositeDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// All the <see cref="FollowPointGroup"/>s contained by this <see cref="FollowPointRenderer"/>.
|
||||
/// </summary>
|
||||
internal IReadOnlyList<FollowPointGroup> Groups => groups;
|
||||
|
||||
private readonly List<FollowPointGroup> groups = new List<FollowPointGroup>();
|
||||
@ -46,21 +52,24 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
|
||||
if (index < groups.Count - 1)
|
||||
{
|
||||
// Update the group's end point to the next hitobject
|
||||
// Update the group's end point to the next group's start point
|
||||
// h1 -> -> -> h2
|
||||
// hitObject nextGroup
|
||||
// group nextGroup
|
||||
|
||||
FollowPointGroup nextGroup = groups[index + 1];
|
||||
group.End = nextGroup.Start;
|
||||
}
|
||||
else
|
||||
{
|
||||
// The end point may be non-null during re-ordering
|
||||
group.End = null;
|
||||
}
|
||||
|
||||
if (index > 0)
|
||||
{
|
||||
// Previous group's end point to the current group's start point
|
||||
// Update the previous group's end point to the current group's start point
|
||||
// h1 -> -> -> h2
|
||||
// prevGroup hitObject
|
||||
// prevGroup group
|
||||
|
||||
FollowPointGroup previousGroup = groups[index - 1];
|
||||
previousGroup.End = group.Start;
|
||||
@ -95,7 +104,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
||||
|
||||
private void onStartTimeChanged(FollowPointGroup group)
|
||||
{
|
||||
// Naive but can be improved if performance becomes problematic
|
||||
// Naive but can be improved if performance becomes an issue
|
||||
removeGroup(group);
|
||||
addGroup(group);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user