1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 23:27:24 +08:00
osu-lazer/osu.Game.Rulesets.Catch/Objects/JuiceStreamPathVertex.cs
ekrctb 4e0155fa4b Make JuiceStreamPath time based instead of distance based.
And remove the "slope limit" feature.
TODO: for a juice stream with a large slope, the slider velocity of the hit object should be changed.
2022-05-08 22:36:33 +09:00

34 lines
857 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;
#nullable enable
namespace osu.Game.Rulesets.Catch.Objects
{
/// <summary>
/// A vertex of a <see cref="JuiceStreamPath"/>.
/// </summary>
public readonly struct JuiceStreamPathVertex : IComparable<JuiceStreamPathVertex>
{
public readonly double Time;
public readonly float X;
public JuiceStreamPathVertex(double time, float x)
{
Time = time;
X = x;
}
public int CompareTo(JuiceStreamPathVertex other)
{
int c = Time.CompareTo(other.Time);
return c != 0 ? c : X.CompareTo(other.X);
}
public override string ToString() => $"({Time}, {X})";
}
}