mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 07:47:23 +08:00
Remove IPositionSnapProvider
This commit is contained in:
parent
a6987f5c95
commit
32d341a468
@ -1,23 +0,0 @@
|
||||
// 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;
|
||||
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
|
||||
{
|
||||
/// <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);
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
// 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;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
[Flags]
|
||||
public enum SnapType
|
||||
{
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Snapping to visible nearby objects.
|
||||
/// </summary>
|
||||
NearbyObjects = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// Grids which are global to the playfield.
|
||||
/// </summary>
|
||||
GlobalGrids = 1 << 1,
|
||||
|
||||
/// <summary>
|
||||
/// Grids which are relative to other nearby hit objects.
|
||||
/// </summary>
|
||||
RelativeGrids = 1 << 2,
|
||||
|
||||
AllGrids = RelativeGrids | GlobalGrids,
|
||||
|
||||
All = NearbyObjects | GlobalGrids | RelativeGrids,
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user