1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-11 02:53:21 +08:00
osu-lazer/osu.Game/Screens/Edit/Commands/RemoveHitObjectCommand.cs
2024-10-08 20:29:27 +02:00

25 lines
693 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;
namespace osu.Game.Screens.Edit.Commands
{
public class RemoveHitObjectCommand : IEditorCommand
{
public EditorBeatmap Beatmap;
public HitObject HitObject;
public RemoveHitObjectCommand(EditorBeatmap beatmap, HitObject hitObject)
{
Beatmap = beatmap;
HitObject = hitObject;
}
public void Apply() => Beatmap.Remove(HitObject);
public IEditorCommand CreateUndo() => new AddHitObjectCommand(Beatmap, HitObject);
}
}