mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Use pattern matching.
This commit is contained in:
@ -148,13 +148,9 @@ namespace osu.Game.Rulesets.UI.Scrolling
|
||||
// Generate the timing points, making non-timing changes use the previous timing change and vice-versa
|
||||
var timingChanges = allPoints.Select(c =>
|
||||
{
|
||||
var timingPoint = c as TimingControlPoint;
|
||||
var difficultyPoint = c as DifficultyControlPoint;
|
||||
|
||||
if (timingPoint != null)
|
||||
if (c is TimingControlPoint timingPoint)
|
||||
lastTimingPoint = timingPoint;
|
||||
|
||||
if (difficultyPoint != null)
|
||||
else if (c is DifficultyControlPoint difficultyPoint)
|
||||
lastDifficultyPoint = difficultyPoint;
|
||||
|
||||
return new MultiplierControlPoint(c.Time)
|
||||
|
Reference in New Issue
Block a user