mirror of
https://github.com/ppy/osu.git
synced 2025-02-06 04:12:55 +08:00
Adjust test spinner rotation
This commit is contained in:
parent
e4179fe440
commit
dbf4884cbc
@ -64,7 +64,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
private class TestDrawableSpinner : DrawableSpinner
|
private class TestDrawableSpinner : DrawableSpinner
|
||||||
{
|
{
|
||||||
private bool auto;
|
private readonly bool auto;
|
||||||
|
|
||||||
public TestDrawableSpinner(Spinner s, bool auto)
|
public TestDrawableSpinner(Spinner s, bool auto)
|
||||||
: base(s)
|
: base(s)
|
||||||
@ -74,12 +74,8 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
protected override void CheckForResult(bool userTriggered, double timeOffset)
|
||||||
{
|
{
|
||||||
if (auto && !userTriggered && Time.Current > Spinner.StartTime + Spinner.Duration / 2 && Progress < 1)
|
if (auto && !userTriggered && Time.Current > Spinner.StartTime)
|
||||||
{
|
Disc.RotationAbsolute += Progress >= 1 ? 10 : (float)(Spinner.Duration / 120);
|
||||||
// force completion only once to not break human interaction
|
|
||||||
Disc.RotationAbsolute = Spinner.SpinsRequired * 360;
|
|
||||||
auto = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.CheckForResult(userTriggered, timeOffset);
|
base.CheckForResult(userTriggered, timeOffset);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user