Skip to content

Commit

Permalink
Fixes #108 - "interact" hot key should respect game pause state
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Dec 14, 2022
1 parent e3168c2 commit 6904d83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/components/Town/Interactable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ export default abstract class Interactable extends Phaser.GameObjects.Sprite {
});
this.overlap();
}
if (this.isOverlapping && this._scene.cursorKeys.space.isDown) {
if (
this.isOverlapping &&
this._scene.cursorKeys.space.isDown &&
!this.townController.paused
) {
this.townController.interact(this);
this.interact();
}
Expand Down

0 comments on commit 6904d83

Please sign in to comment.