1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 23:23:04 +08:00
osu-lazer/osu.Game/Rulesets/Edit/IPositionSnapProvider.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
974 B
C#
Raw Normal View History

2019-10-25 15:50:21 +08:00
// 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.Framework.Allocation;
2019-10-25 15:50:21 +08:00
using osuTK;
namespace osu.Game.Rulesets.Edit
{
/// <summary>
/// A snap provider which given a proposed position for a hit object, potentially offers a more correct position and time value inferred from the context of the beatmap.
/// </summary>
[Cached]
public interface IPositionSnapProvider
2019-10-25 15:50:21 +08:00
{
/// <summary>
/// Given a position, find a valid time and position snap.
/// </summary>
/// <param name="screenSpacePosition">The screen-space position to be snapped.</param>
/// <param name="snapType">The type of snapping to apply.</param>
/// <returns>The time and position post-snapping.</returns>
SnapResult FindSnappedPositionAndTime(Vector2 screenSpacePosition, SnapType snapType = SnapType.All);
2019-10-25 15:50:21 +08:00
}
}