mirror of
https://github.com/ppy/osu
synced 2025-01-09 23:59:44 +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
|
||||
{
|
||||
private RulesetInfo catchRuleset;
|
||||
private TestCatcherArea catcherArea;
|
||||
|
||||
public override IReadOnlyList<Type> RequiredTypes => new[]
|
||||
{
|
||||
@ -33,7 +32,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
Child = new CatchInputManager(catchRuleset)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
|
||||
Child = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size })
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.BottomLeft
|
||||
|
@ -255,7 +255,7 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
|
||||
HyperDashing = true;
|
||||
hyperDashModifier = Math.Abs(velocity);
|
||||
hyperDashDirection = (int)Math.Sign(velocity);
|
||||
hyperDashDirection = Math.Sign(velocity);
|
||||
hyperDashTargetPosition = target.X;
|
||||
}
|
||||
else
|
||||
@ -267,9 +267,9 @@ namespace osu.Game.Rulesets.Catch.UI
|
||||
}
|
||||
|
||||
private double hyperDashModifier = 1;
|
||||
private int hyperDashDirection = 0;
|
||||
private int hyperDashDirection;
|
||||
private float hyperDashTargetPosition;
|
||||
private bool hyperDashing = false;
|
||||
private bool hyperDashing;
|
||||
|
||||
/// <summary>
|
||||
/// 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);
|
||||
|
||||
// Correct overshooting.
|
||||
if ((hyperDashDirection > 0 && hyperDashTargetPosition < X) ||
|
||||
(hyperDashDirection < 0 && hyperDashTargetPosition > X))
|
||||
if (hyperDashDirection > 0 && hyperDashTargetPosition < X ||
|
||||
hyperDashDirection < 0 && hyperDashTargetPosition > X)
|
||||
{
|
||||
X = hyperDashTargetPosition;
|
||||
HyperDashing = false;
|
||||
|
Loading…
Reference in New Issue
Block a user