Got some keys mixed up
This commit is contained in:
parent
0f70d1e8f1
commit
b642879da4
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ object InputReceiver : BaseBehavior<GameContext>() {
|
|||
val newPosition = when (uiEvent.code) {
|
||||
KeyCode.KEY_W -> currentPos.withRelativeY(-1)
|
||||
KeyCode.KEY_A -> currentPos.withRelativeX(-1)
|
||||
KeyCode.KEY_D -> currentPos.withRelativeY(1)
|
||||
KeyCode.KEY_S -> currentPos.withRelativeX(1)
|
||||
KeyCode.KEY_S -> currentPos.withRelativeY(1)
|
||||
KeyCode.KEY_D -> currentPos.withRelativeX(1)
|
||||
else -> {
|
||||
// If some key is pressed other than WASD, then we just return the current position, so no movement will happen
|
||||
currentPos
|
||||
|
|
Loading…
Reference in a new issue