1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 01:07:25 +08:00
osu-lazer/osu.Game.Rulesets.Osu/Objects/Spinner.cs

30 lines
1003 B
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-04-18 15:05:58 +08:00
using osu.Game.Rulesets.Objects.Types;
2017-05-14 11:45:35 +08:00
using osu.Game.Beatmaps.Timing;
using osu.Game.Database;
2017-04-18 15:05:58 +08:00
namespace osu.Game.Rulesets.Osu.Objects
{
public class Spinner : OsuHitObject, IHasEndTime
{
public double EndTime { get; set; }
public double Duration => EndTime - StartTime;
2017-05-14 11:45:35 +08:00
/// <summary>
/// Number of spins required to finish the spinner without miss.
/// </summary>
public double SpinsRequired { get; protected set; }
public override bool NewCombo => true;
2017-05-14 11:45:35 +08:00
public override void ApplyDefaults(TimingInfo timing, BeatmapDifficulty difficulty)
{
base.ApplyDefaults(timing, difficulty);
SpinsRequired = Duration / 1000 * BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5);
}
}
}