mirror of
https://github.com/ppy/osu.git
synced 2025-03-22 22:17:46 +08:00
Split out classes
This commit is contained in:
parent
19e2da9c73
commit
7c9fbb6fcf
@ -103,15 +103,4 @@ namespace osu.Game.Rulesets.Mania.Edit
|
||||
new HoldNoteCompositionTool()
|
||||
};
|
||||
}
|
||||
|
||||
public class ManiaSnapResult : SnapResult
|
||||
{
|
||||
public readonly Column Column;
|
||||
|
||||
public ManiaSnapResult(Vector2 screenSpacePosition, double time, Column column)
|
||||
: base(screenSpacePosition, time)
|
||||
{
|
||||
Column = column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
20
osu.Game.Rulesets.Mania/Edit/ManiaSnapResult.cs
Normal file
20
osu.Game.Rulesets.Mania/Edit/ManiaSnapResult.cs
Normal file
@ -0,0 +1,20 @@
|
||||
// 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.Edit;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.Edit
|
||||
{
|
||||
public class ManiaSnapResult : SnapResult
|
||||
{
|
||||
public readonly Column Column;
|
||||
|
||||
public ManiaSnapResult(Vector2 screenSpacePosition, double time, Column column)
|
||||
: base(screenSpacePosition, time)
|
||||
{
|
||||
Column = column;
|
||||
}
|
||||
}
|
||||
}
|
@ -53,23 +53,4 @@ namespace osu.Game.Rulesets.Edit
|
||||
/// <returns>A value that represents <paramref name="distance"/> snapped to the closest beat of the timing point.</returns>
|
||||
float GetSnappedDistanceFromDistance(double referenceTime, float distance);
|
||||
}
|
||||
|
||||
public class SnapResult
|
||||
{
|
||||
/// <summary>
|
||||
/// The screen space position, potentially altered for snapping.
|
||||
/// </summary>
|
||||
public Vector2 ScreenSpacePosition;
|
||||
|
||||
/// <summary>
|
||||
/// The resultant time for snapping, if a value could be attained.
|
||||
/// </summary>
|
||||
public double? Time;
|
||||
|
||||
public SnapResult(Vector2 screenSpacePosition, double? time)
|
||||
{
|
||||
ScreenSpacePosition = screenSpacePosition;
|
||||
Time = time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
29
osu.Game/Rulesets/Edit/SnapResult.cs
Normal file
29
osu.Game/Rulesets/Edit/SnapResult.cs
Normal file
@ -0,0 +1,29 @@
|
||||
// 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 osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
/// <summary>
|
||||
/// The result of a position/time snapping process.
|
||||
/// </summary>
|
||||
public class SnapResult
|
||||
{
|
||||
/// <summary>
|
||||
/// The screen space position, potentially altered for snapping.
|
||||
/// </summary>
|
||||
public Vector2 ScreenSpacePosition;
|
||||
|
||||
/// <summary>
|
||||
/// The resultant time for snapping, if a value could be attained.
|
||||
/// </summary>
|
||||
public double? Time;
|
||||
|
||||
public SnapResult(Vector2 screenSpacePosition, double? time)
|
||||
{
|
||||
ScreenSpacePosition = screenSpacePosition;
|
||||
Time = time;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user