mirror of
https://github.com/ppy/osu
synced 2025-01-10 16:19:47 +00:00
Fix InspectCode issues.
This commit is contained in:
parent
99c0e19189
commit
be323c7147
@ -16,7 +16,6 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
public class TestCaseCatcherArea : OsuTestCase
|
public class TestCaseCatcherArea : OsuTestCase
|
||||||
{
|
{
|
||||||
private RulesetInfo catchRuleset;
|
private RulesetInfo catchRuleset;
|
||||||
private TestCatcherArea catcherArea;
|
|
||||||
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||||
{
|
{
|
||||||
@ -33,7 +32,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
Child = new CatchInputManager(catchRuleset)
|
Child = new CatchInputManager(catchRuleset)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
|
Child = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.BottomLeft
|
Origin = Anchor.BottomLeft
|
||||||
|
@ -255,7 +255,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
|
|
||||||
HyperDashing = true;
|
HyperDashing = true;
|
||||||
hyperDashModifier = Math.Abs(velocity);
|
hyperDashModifier = Math.Abs(velocity);
|
||||||
hyperDashDirection = (int)Math.Sign(velocity);
|
hyperDashDirection = Math.Sign(velocity);
|
||||||
hyperDashTargetPosition = target.X;
|
hyperDashTargetPosition = target.X;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -267,9 +267,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private double hyperDashModifier = 1;
|
private double hyperDashModifier = 1;
|
||||||
private int hyperDashDirection = 0;
|
private int hyperDashDirection;
|
||||||
private float hyperDashTargetPosition;
|
private float hyperDashTargetPosition;
|
||||||
private bool hyperDashing = false;
|
private bool hyperDashing;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether we are hypderdashing or not.
|
/// Whether we are hypderdashing or not.
|
||||||
@ -361,8 +361,8 @@ namespace osu.Game.Rulesets.Catch.UI
|
|||||||
X = (float)MathHelper.Clamp(X + direction * Clock.ElapsedFrameTime * speed, 0, 1);
|
X = (float)MathHelper.Clamp(X + direction * Clock.ElapsedFrameTime * speed, 0, 1);
|
||||||
|
|
||||||
// Correct overshooting.
|
// Correct overshooting.
|
||||||
if ((hyperDashDirection > 0 && hyperDashTargetPosition < X) ||
|
if (hyperDashDirection > 0 && hyperDashTargetPosition < X ||
|
||||||
(hyperDashDirection < 0 && hyperDashTargetPosition > X))
|
hyperDashDirection < 0 && hyperDashTargetPosition > X)
|
||||||
{
|
{
|
||||||
X = hyperDashTargetPosition;
|
X = hyperDashTargetPosition;
|
||||||
HyperDashing = false;
|
HyperDashing = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user