Create a constructor for break period

For simple construction of break periods (e.g. filling a method with an array of break periods inside a test case)
This commit is contained in:
Salman Ahmed
2020-04-05 21:29:03 +03:00
parent 9477629a56
commit 0eaea8ef9d
3 changed files with 20 additions and 21 deletions

View File

@ -305,12 +305,9 @@ namespace osu.Game.Beatmaps.Formats
case LegacyEventType.Break:
double start = getOffsetTime(Parsing.ParseDouble(split[1]));
double end = Math.Max(start, getOffsetTime(Parsing.ParseDouble(split[2])));
var breakEvent = new BreakPeriod
{
StartTime = start,
EndTime = Math.Max(start, getOffsetTime(Parsing.ParseDouble(split[2])))
};
var breakEvent = new BreakPeriod(start, end);
if (!breakEvent.HasEffect)
return;