1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-11 02:43:22 +08:00
osu-lazer/osu.Game/Screens/Edit/Commands/SetSliderVelocityMultiplierCommand.cs

31 lines
935 B
C#

// 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.Game.Rulesets.Objects.Types;
namespace osu.Game.Screens.Edit.Commands
{
public class SetSliderVelocityMultiplierCommand : IEditorCommand
{
public readonly IHasSliderVelocity Target;
public readonly double SliderVelocityMultiplier;
public SetSliderVelocityMultiplierCommand(IHasSliderVelocity target, double sliderVelocityMultiplier)
{
Target = target;
SliderVelocityMultiplier = sliderVelocityMultiplier;
}
public void Apply()
{
Target.SliderVelocityMultiplier = SliderVelocityMultiplier;
}
public IEditorCommand CreateUndo()
{
return new SetSliderVelocityMultiplierCommand(Target, Target.SliderVelocityMultiplier);
}
}
}