mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
29 lines
826 B
C#
29 lines
826 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 System.Linq;
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
using osu.Game.Screens.Edit.Compose.Components;
|
|
|
|
namespace osu.Game.Rulesets.Osu.Edit
|
|
{
|
|
public class OsuSelectionHandler : SelectionHandler
|
|
{
|
|
public override void HandleMovement(MoveSelectionEvent moveEvent)
|
|
{
|
|
foreach (var h in SelectedHitObjects.OfType<OsuHitObject>())
|
|
{
|
|
if (h is Spinner)
|
|
{
|
|
// Spinners don't support position adjustments
|
|
continue;
|
|
}
|
|
|
|
h.Position += moveEvent.InstantDelta;
|
|
}
|
|
|
|
base.HandleMovement(moveEvent);
|
|
}
|
|
}
|
|
}
|