mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Split ControlPoint into different types.
# Conflicts: # osu.Game.Rulesets.Mania/UI/Column.cs
This commit is contained in:
@ -8,6 +8,7 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using OpenTK;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Timing
|
||||
{
|
||||
@ -26,9 +27,9 @@ namespace osu.Game.Rulesets.Mania.Timing
|
||||
/// </summary>
|
||||
public double TimeSpan { get; set; }
|
||||
|
||||
private readonly List<DrawableControlPoint> drawableControlPoints;
|
||||
private readonly List<DrawableControlPoint> drawableControlPoints = new List<DrawableControlPoint>();
|
||||
|
||||
public ControlPointContainer(IEnumerable<ControlPoint> timingChanges)
|
||||
public ControlPointContainer(IEnumerable<TimingChange> timingChanges)
|
||||
{
|
||||
drawableControlPoints = timingChanges.Select(t => new DrawableControlPoint(t)).ToList();
|
||||
Children = drawableControlPoints;
|
||||
@ -64,7 +65,7 @@ namespace osu.Game.Rulesets.Mania.Timing
|
||||
/// </summary>
|
||||
private class DrawableControlPoint : Container
|
||||
{
|
||||
private readonly ControlPoint timingChange;
|
||||
private readonly TimingChange timingChange;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
private readonly Container content;
|
||||
@ -76,7 +77,7 @@ namespace osu.Game.Rulesets.Mania.Timing
|
||||
/// the content container will scroll at twice the normal rate.
|
||||
/// </summary>
|
||||
/// <param name="timingChange">The control point to create the drawable control point for.</param>
|
||||
public DrawableControlPoint(ControlPoint timingChange)
|
||||
public DrawableControlPoint(TimingChange timingChange)
|
||||
{
|
||||
this.timingChange = timingChange;
|
||||
|
||||
|
23
osu.Game.Rulesets.Mania/Timing/TimingChange.cs
Normal file
23
osu.Game.Rulesets.Mania/Timing/TimingChange.cs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Timing
|
||||
{
|
||||
public class TimingChange
|
||||
{
|
||||
/// <summary>
|
||||
/// The time at which this timing change happened.
|
||||
/// </summary>
|
||||
public double Time;
|
||||
|
||||
/// <summary>
|
||||
/// The beat length.
|
||||
/// </summary>
|
||||
public double BeatLength = 500;
|
||||
|
||||
/// <summary>
|
||||
/// The speed multiplier.
|
||||
/// </summary>
|
||||
public double SpeedMultiplier = 1;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user