mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Use GetEndTime()
instead of a switch expression
This commit is contained in:
parent
b7dd26612d
commit
a7ea7b8b0b
@ -17,6 +17,7 @@ using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Beatmaps;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
@ -188,12 +189,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
var startTime = origHitObjects.First().StartTime;
|
||||
var endObj = origHitObjects.Last();
|
||||
var endTime = endObj switch
|
||||
{
|
||||
Slider slider => slider.EndTime,
|
||||
Spinner spinner => spinner.EndTime,
|
||||
_ => endObj.StartTime
|
||||
};
|
||||
var endTime = endObj.GetEndTime();
|
||||
|
||||
var beats = beatmap.ControlPointInfo.TimingPoints
|
||||
.Where(x => Precision.AlmostBigger(endTime, x.Time))
|
||||
|
Loading…
Reference in New Issue
Block a user