Skip to content

Commit

Permalink
Merge pull request #57 from neki-dev/hotfix
Browse files Browse the repository at this point in the history
Update to 1.10.1
  • Loading branch information
neki-dev authored Oct 9, 2023
2 parents a41b02d + 377f65a commit 2bf69b3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "izowave",
"description": "Isometric game. Build and defense in open world",
"version": "1.10.0",
"version": "1.10.1",
"keywords": [
"game",
"isometric",
Expand Down
8 changes: 4 additions & 4 deletions src/const/world/entities/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ export const PLAYER_MOVEMENT_ANGLES = {
};

export const PLAYER_MOVEMENT_KEYS: Record<string, MovementDirection> = {
w: MovementDirection.UP,
KeyW: MovementDirection.UP,
ArrowUp: MovementDirection.UP,
s: MovementDirection.DOWN,
KeyS: MovementDirection.DOWN,
ArrowDown: MovementDirection.DOWN,
a: MovementDirection.LEFT,
KeyA: MovementDirection.LEFT,
ArrowLeft: MovementDirection.LEFT,
d: MovementDirection.RIGHT,
KeyD: MovementDirection.RIGHT,
ArrowRight: MovementDirection.RIGHT,
};
4 changes: 2 additions & 2 deletions src/game/scenes/world/entities/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ export class Player extends Sprite implements IPlayer {
};

this.scene.input.keyboard?.on(Phaser.Input.Keyboard.Events.ANY_KEY_DOWN, (event: KeyboardEvent) => {
toggleKeyState(event.key, true);
toggleKeyState(event.code, true);
});

this.scene.input.keyboard?.on(Phaser.Input.Keyboard.Events.ANY_KEY_UP, (event: KeyboardEvent) => {
toggleKeyState(event.key, false);
toggleKeyState(event.code, false);
});
}

Expand Down

0 comments on commit 2bf69b3

Please sign in to comment.