mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:02:54 +08:00
Made cursortrail work with multiple positions
This commit is contained in:
parent
063b606a12
commit
5aecc3d761
@ -122,9 +122,9 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
return base.OnMouseMove(state);
|
return base.OnMouseMove(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector2 pos1 = lastPosition.Value;
|
|
||||||
foreach (Vector2 pos2 in resampler.AddPosition(state.Mouse.NativeState.Position))
|
foreach (Vector2 pos2 in resampler.AddPosition(state.Mouse.NativeState.Position))
|
||||||
{
|
{
|
||||||
|
Vector2 pos1 = lastPosition.Value;
|
||||||
Vector2 diff = pos2 - pos1;
|
Vector2 diff = pos2 - pos1;
|
||||||
float distance = diff.Length;
|
float distance = diff.Length;
|
||||||
Vector2 direction = diff / distance;
|
Vector2 direction = diff / distance;
|
||||||
|
Loading…
Reference in New Issue
Block a user