1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-22 07:36:05 +08:00

Cast SpinsRequired value to int

This commit is contained in:
EVAST9919 2017-05-14 09:22:49 +03:00
parent ef23405733
commit a4d5660e41
2 changed files with 3 additions and 3 deletions

View File

@ -108,7 +108,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
private Vector2 scaleToCircle => circle.Scale * circle.DrawWidth / DrawWidth * 0.95f; private Vector2 scaleToCircle => circle.Scale * circle.DrawWidth / DrawWidth * 0.95f;
public float Progress => MathHelper.Clamp(disc.RotationAbsolute / 360 / (float)spinner.SpinsRequired, 0, 1); public float Progress => MathHelper.Clamp(disc.RotationAbsolute / 360 / spinner.SpinsRequired, 0, 1);
protected override void UpdatePreemptState() protected override void UpdatePreemptState()
{ {

View File

@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Osu.Objects
/// <summary> /// <summary>
/// Number of spins required to finish the spinner without miss. /// Number of spins required to finish the spinner without miss.
/// </summary> /// </summary>
public double SpinsRequired { get; protected set; } public int SpinsRequired { get; protected set; }
public override bool NewCombo => true; public override bool NewCombo => true;
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Objects
{ {
base.ApplyDefaults(timing, difficulty); base.ApplyDefaults(timing, difficulty);
SpinsRequired = Duration / 1000 * BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5); SpinsRequired = (int)(Duration / 1000 * BeatmapDifficulty.DifficultyRange(difficulty.OverallDifficulty, 3, 5, 7.5));
} }
} }
} }