Fix InspectCode issues.

This commit is contained in:
ekrctb 2018-05-25 02:14:56 +09:00
parent 99c0e19189
commit be323c7147
2 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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;