2020-11-14 20:10:12 +00: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.Game.Rulesets.Judgements;
|
|
|
|
|
using osu.Game.Rulesets.Objects;
|
|
|
|
|
using osu.Game.Rulesets.Osu.Objects;
|
2023-10-16 10:07:03 +00:00
|
|
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
2020-11-14 20:10:12 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Osu.Judgements
|
|
|
|
|
{
|
|
|
|
|
public class OsuSpinnerJudgementResult : OsuJudgementResult
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The <see cref="Spinner"/>.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public Spinner Spinner => (Spinner)HitObject;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-10-16 10:07:03 +00:00
|
|
|
|
/// The total amount that the spinner was rotated.
|
2020-11-14 20:10:12 +00:00
|
|
|
|
/// </summary>
|
2023-10-16 10:07:03 +00:00
|
|
|
|
public float TotalRotation => History.TotalRotation;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores the spinning history of the spinner.<br />
|
|
|
|
|
/// Instants of movement deltas may be added or removed from this in order to calculate the total rotation for the spinner.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly SpinnerSpinHistory History = new SpinnerSpinHistory();
|
2020-11-14 20:10:12 +00:00
|
|
|
|
|
2021-03-11 03:58:15 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Time instant at which the spin was started (the first user input which caused an increase in spin).
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double? TimeStarted;
|
|
|
|
|
|
2020-11-14 21:42:19 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Time instant at which the spinner has been completed (the user has executed all required spins).
|
|
|
|
|
/// Will be null if all required spins haven't been completed.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public double? TimeCompleted;
|
|
|
|
|
|
2020-11-14 20:10:12 +00:00
|
|
|
|
public OsuSpinnerJudgementResult(HitObject hitObject, Judgement judgement)
|
|
|
|
|
: base(hitObject, judgement)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|