Skip to content

Commit 0fb3ab3

Browse files
author
Alexis Huvier
committed
fix(controlcomponent): up and down inversed
1 parent 65e20a7 commit 0fb3ab3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SharpEngine.Core/Component/ControlComponent.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ private Vec2 GetFourDirectionMovement()
185185
if (InputManager.IsKeyDown(_keys[ControlKey.Right]))
186186
dirX++;
187187
if (InputManager.IsKeyDown(_keys[ControlKey.Up]))
188-
dirY++;
189-
if (InputManager.IsKeyDown(_keys[ControlKey.Down]))
190188
dirY--;
189+
if (InputManager.IsKeyDown(_keys[ControlKey.Down]))
190+
dirY++;
191191
return new Vec2(dirX, dirY);
192192
}
193193
}
@@ -215,9 +215,9 @@ private Vec2 GetUpDownMovement()
215215
{
216216
var dirY = 0;
217217
if (InputManager.IsKeyDown(_keys[ControlKey.Up]))
218-
dirY++;
219-
if (InputManager.IsKeyDown(_keys[ControlKey.Down]))
220218
dirY--;
219+
if (InputManager.IsKeyDown(_keys[ControlKey.Down]))
220+
dirY++;
221221
return new Vec2(0, dirY);
222222
}
223223
}

0 commit comments

Comments
 (0)