mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 15:27:30 +08:00
Rename RateAdjustedRotation
to TotalRotation
This commit is contained in:
parent
84be714d6b
commit
159b24acf7
@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
});
|
||||
|
||||
AddStep("rotate some", () => dho.RotationTracker.AddRotation(180));
|
||||
AddAssert("rotation is set", () => dho.Result.RateAdjustedRotation == 180);
|
||||
AddAssert("rotation is set", () => dho.Result.TotalRotation == 180);
|
||||
|
||||
AddStep("apply new spinner", () => dho.Apply(prepareObject(new Spinner
|
||||
{
|
||||
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
Duration = 1000,
|
||||
})));
|
||||
|
||||
AddAssert("rotation is reset", () => dho.Result.RateAdjustedRotation == 0);
|
||||
AddAssert("rotation is reset", () => dho.Result.TotalRotation == 0);
|
||||
}
|
||||
|
||||
private Spinner prepareObject(Spinner circle)
|
||||
|
@ -63,11 +63,11 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
trackerRotationTolerance = Math.Abs(drawableSpinner.RotationTracker.Rotation * 0.1f);
|
||||
});
|
||||
AddAssert("is disc rotation not almost 0", () => drawableSpinner.RotationTracker.Rotation, () => Is.Not.EqualTo(0).Within(100));
|
||||
AddAssert("is disc rotation absolute not almost 0", () => drawableSpinner.Result.RateAdjustedRotation, () => Is.Not.EqualTo(0).Within(100));
|
||||
AddAssert("is disc rotation absolute not almost 0", () => drawableSpinner.Result.TotalRotation, () => Is.Not.EqualTo(0).Within(100));
|
||||
|
||||
addSeekStep(0);
|
||||
AddAssert("is disc rotation almost 0", () => drawableSpinner.RotationTracker.Rotation, () => Is.EqualTo(0).Within(trackerRotationTolerance));
|
||||
AddAssert("is disc rotation absolute almost 0", () => drawableSpinner.Result.RateAdjustedRotation, () => Is.EqualTo(0).Within(100));
|
||||
AddAssert("is disc rotation absolute almost 0", () => drawableSpinner.Result.TotalRotation, () => Is.EqualTo(0).Within(100));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -82,7 +82,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
finalTrackerRotation = drawableSpinner.RotationTracker.Rotation;
|
||||
trackerRotationTolerance = Math.Abs(finalTrackerRotation * 0.05f);
|
||||
});
|
||||
AddStep("retrieve cumulative disc rotation", () => finalCumulativeTrackerRotation = drawableSpinner.Result.RateAdjustedRotation);
|
||||
AddStep("retrieve cumulative disc rotation", () => finalCumulativeTrackerRotation = drawableSpinner.Result.TotalRotation);
|
||||
|
||||
addSeekStep(spinner_start_time + 2500);
|
||||
AddAssert("disc rotation rewound",
|
||||
@ -92,13 +92,13 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
() => drawableSpinner.RotationTracker.Rotation, () => Is.EqualTo(finalTrackerRotation / 2).Within(trackerRotationTolerance));
|
||||
AddAssert("is cumulative rotation rewound",
|
||||
// cumulative rotation is not damped, so we're treating it as the "ground truth" and allowing a comparatively smaller margin of error.
|
||||
() => drawableSpinner.Result.RateAdjustedRotation, () => Is.EqualTo(finalCumulativeTrackerRotation / 2).Within(100));
|
||||
() => drawableSpinner.Result.TotalRotation, () => Is.EqualTo(finalCumulativeTrackerRotation / 2).Within(100));
|
||||
|
||||
addSeekStep(spinner_start_time + 5000);
|
||||
AddAssert("is disc rotation almost same",
|
||||
() => drawableSpinner.RotationTracker.Rotation, () => Is.EqualTo(finalTrackerRotation).Within(trackerRotationTolerance));
|
||||
AddAssert("is cumulative rotation almost same",
|
||||
() => drawableSpinner.Result.RateAdjustedRotation, () => Is.EqualTo(finalCumulativeTrackerRotation).Within(100));
|
||||
() => drawableSpinner.Result.TotalRotation, () => Is.EqualTo(finalCumulativeTrackerRotation).Within(100));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -135,7 +135,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
{
|
||||
// multipled by 2 to nullify the score multiplier. (autoplay mod selected)
|
||||
long totalScore = ((ScoreExposedPlayer)Player).ScoreProcessor.TotalScore.Value * 2;
|
||||
return totalScore == (int)(drawableSpinner.Result.RateAdjustedRotation / 360) * new SpinnerTick().CreateJudgement().MaxNumericResult;
|
||||
return totalScore == (int)(drawableSpinner.Result.TotalRotation / 360) * new SpinnerTick().CreateJudgement().MaxNumericResult;
|
||||
});
|
||||
|
||||
addSeekStep(0);
|
||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Rulesets.Osu.Judgements
|
||||
/// If Double Time is active instead (with a speed multiplier of 1.5x),
|
||||
/// in the same scenario the property will return 720 * 1.5 = 1080.
|
||||
/// </example>
|
||||
public float RateAdjustedRotation;
|
||||
public float TotalRotation;
|
||||
|
||||
/// <summary>
|
||||
/// Time instant at which the spin was started (the first user input which caused an increase in spin).
|
||||
|
@ -218,7 +218,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
// these become implicitly hit.
|
||||
return 1;
|
||||
|
||||
return Math.Clamp(Result.RateAdjustedRotation / 360 / HitObject.SpinsRequired, 0, 1);
|
||||
return Math.Clamp(Result.TotalRotation / 360 / HitObject.SpinsRequired, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
// don't update after end time to avoid the rate display dropping during fade out.
|
||||
// this shouldn't be limited to StartTime as it causes weirdness with the underlying calculation, which is expecting updates during that period.
|
||||
if (Time.Current <= HitObject.EndTime)
|
||||
spmCalculator.SetRotation(Result.RateAdjustedRotation);
|
||||
spmCalculator.SetRotation(Result.TotalRotation);
|
||||
|
||||
updateBonusScore();
|
||||
}
|
||||
@ -293,7 +293,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
if (ticks.Count == 0)
|
||||
return;
|
||||
|
||||
int spins = (int)(Result.RateAdjustedRotation / 360);
|
||||
int spins = (int)(Result.TotalRotation / 360);
|
||||
|
||||
if (spins < completedFullSpins)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
{
|
||||
get
|
||||
{
|
||||
int rotations = (int)(drawableSpinner.Result.RateAdjustedRotation / 360);
|
||||
int rotations = (int)(drawableSpinner.Result.TotalRotation / 360);
|
||||
|
||||
if (wholeRotationCount == rotations) return false;
|
||||
|
||||
|
@ -200,7 +200,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
{
|
||||
get
|
||||
{
|
||||
int rotations = (int)(drawableSpinner.Result.RateAdjustedRotation / 360);
|
||||
int rotations = (int)(drawableSpinner.Result.TotalRotation / 360);
|
||||
|
||||
if (wholeRotationCount == rotations) return false;
|
||||
|
||||
|
@ -110,7 +110,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
currentRotation += angle;
|
||||
// rate has to be applied each frame, because it's not guaranteed to be constant throughout playback
|
||||
// (see: ModTimeRamp)
|
||||
drawableSpinner.Result.RateAdjustedRotation += (float)(Math.Abs(angle) * (gameplayClock?.GetTrueGameplayRate() ?? Clock.Rate));
|
||||
drawableSpinner.Result.TotalRotation += (float)(Math.Abs(angle) * (gameplayClock?.GetTrueGameplayRate() ?? Clock.Rate));
|
||||
}
|
||||
|
||||
private void resetState(DrawableHitObject obj)
|
||||
|
Loading…
Reference in New Issue
Block a user