1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 15:02:55 +08:00
osu-lazer/osu.Game/Beatmaps/Timing/BreakPeriod.cs

34 lines
1.0 KiB
C#
Raw Normal View History

2018-01-05 19:21:19 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-05-17 17:42:48 +08:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
namespace osu.Game.Beatmaps.Timing
2017-05-17 17:42:48 +08:00
{
public class BreakPeriod
2017-05-17 17:42:48 +08:00
{
/// <summary>
/// The minimum duration required for a break to have any effect.
/// </summary>
public const double MIN_BREAK_DURATION = 650;
2017-05-17 17:42:48 +08:00
/// <summary>
/// The break start time.
/// </summary>
public double StartTime;
2017-05-17 17:42:48 +08:00
/// <summary>
/// The break end time.
/// </summary>
public double EndTime;
/// <summary>
/// The break duration.
2017-05-17 17:42:48 +08:00
/// </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.
2017-05-17 17:42:48 +08:00
/// </summary>
public bool HasEffect => Duration >= MIN_BREAK_DURATION;
2017-05-17 17:42:48 +08:00
}
2018-01-05 19:21:19 +08:00
}