mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Allow mods to apply to track, not clock
This commit is contained in:
@ -1,9 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Timing;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
@ -15,12 +14,9 @@ namespace osu.Game.Rulesets.Mods
|
||||
public override IconUsage Icon => OsuIcon.ModNightcore;
|
||||
public override string Description => "Uguuuuuuuu...";
|
||||
|
||||
public override void ApplyToClock(IAdjustableClock clock)
|
||||
public override void ApplyToTrack(Track track)
|
||||
{
|
||||
if (clock is IHasPitchAdjust pitchAdjust)
|
||||
pitchAdjust.PitchAdjust *= RateAdjust;
|
||||
else
|
||||
base.ApplyToClock(clock);
|
||||
track.Frequency.Value *= RateAdjust;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user