1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 09:42:54 +08:00

Add SetPathTypeCommand

This commit is contained in:
Marvin Schürz 2024-10-10 23:10:56 +02:00
parent 8aa5385e3f
commit 57c12191e5

View File

@ -0,0 +1,22 @@
// 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;
using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Screens.Edit.Commands
{
public class SetPathTypeCommand : PropertyChangeCommand<PathControlPoint, PathType?>
{
public SetPathTypeCommand(PathControlPoint target, PathType? value)
: base(target, value)
{
}
protected override PathType? ReadValue(PathControlPoint target) => target.Type;
protected override void WriteValue(PathControlPoint target, PathType? value) => target.Type = value;
protected override SetPathTypeCommand CreateInstance(PathControlPoint target, PathType? value) => new SetPathTypeCommand(target, value);
}
}