Remove the concept of beatmap events, rename BreakEvent -> BreakPeriod.

This commit is contained in:
smoogipooo
2017-05-22 10:12:33 +09:00
parent 8c260e3364
commit 0a0139aded
8 changed files with 21 additions and 80 deletions

View File

@ -0,0 +1,33 @@
// 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.Beatmaps.Timing
{
public class BreakPeriod
{
/// <summary>
/// The minimum duration required for a break to have any effect.
/// </summary>
private const double min_break_duration = 650;
/// <summary>
/// The break start time.
/// </summary>
public double StartTime;
/// <summary>
/// The break end time.
/// </summary>
public double EndTime;
/// <summary>
/// The break duration.
/// </summary>
public double Duration => EndTime - StartTime;
/// <summary>
/// Whether the break has any effect. Breaks that are too short are culled before they are added to the beatmap.
/// </summary>
public bool HasEffect => Duration >= min_break_duration;
}
}