Allow using J/K to move box as well

This commit is contained in:
Dean Herbert 2022-06-07 20:03:49 +09:00
parent 146225d87e
commit 00a6cbe53f
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public LatencyComparerScreen()
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Text = @"Welcome to the latency comparer!
Use the arrow keys or Z/X to move the square.
Use the arrow keys, Z/X/J/K to move the square.
You can click the targets but you don't have to.
Do whatever you need to try and perceive the difference in latency, then choose your best side.
",
@ -483,10 +483,12 @@ protected override void Update()
{
switch (key)
{
case Key.K:
case Key.Up:
box.Y = MathHelper.Clamp(box.Y - movementAmount, 0.1f, 0.9f);
break;
case Key.J:
case Key.Down:
box.Y = MathHelper.Clamp(box.Y + movementAmount, 0.1f, 0.9f);
break;