mirror of
https://github.com/ppy/osu.git
synced 2025-01-11 05:52:56 +08:00
31 lines
935 B
C#
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);
|
||
|
}
|
||
|
}
|
||
|
}
|