From de4f3fd2fe45478ffabc84f055592e11b119d0a4 Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Mon, 11 Mar 2024 16:35:51 -0600 Subject: prettier, fix assets and css --- src/engine/systems/Input.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/engine/systems/Input.ts') diff --git a/src/engine/systems/Input.ts b/src/engine/systems/Input.ts index 9199c89..c527f29 100644 --- a/src/engine/systems/Input.ts +++ b/src/engine/systems/Input.ts @@ -32,20 +32,20 @@ export class Input extends System { public update(_dt: number, game: Game) { game.forEachEntityWithComponent(ComponentNames.Control, (entity) => - this.handleMovement(entity, game) + this.handleMovement(entity, game), ); game.forEachEntityWithComponent(ComponentNames.Interactable, (entity) => - this.handleInteraction(entity) + this.handleInteraction(entity), ); } private handleInteraction(entity: Entity) { const interactable = entity.getComponent( - ComponentNames.Interactable + ComponentNames.Interactable, ); const interact = this.hasSomeKey( - KeyConstants.ActionKeys.get(Action.INTERACT) + KeyConstants.ActionKeys.get(Action.INTERACT), ); if (!interact) { @@ -54,13 +54,13 @@ export class Input extends System { interactable.interact(); KeyConstants.ActionKeys.get(Action.INTERACT)!.forEach((key) => - this.keyReleased(key) + this.keyReleased(key), ); } public handleMovement(entity: Entity, game: Game) { const controlComponent = entity.getComponent( - ComponentNames.Control + ComponentNames.Control, ); if (!controlComponent.isControllable) return; @@ -85,22 +85,22 @@ export class Input extends System { if (moveUp) { gridComponent.movingDirection = Direction.UP; KeyConstants.ActionKeys.get(Action.MOVE_UP)!.forEach((key) => - this.keyReleased(key) + this.keyReleased(key), ); } else if (moveLeft) { gridComponent.movingDirection = Direction.LEFT; KeyConstants.ActionKeys.get(Action.MOVE_LEFT)!.forEach((key) => - this.keyReleased(key) + this.keyReleased(key), ); } else if (moveRight) { gridComponent.movingDirection = Direction.RIGHT; KeyConstants.ActionKeys.get(Action.MOVE_RIGHT)!.forEach((key) => - this.keyReleased(key) + this.keyReleased(key), ); } else if (moveDown) { gridComponent.movingDirection = Direction.DOWN; KeyConstants.ActionKeys.get(Action.MOVE_DOWN)!.forEach((key) => - this.keyReleased(key) + this.keyReleased(key), ); } -- cgit v1.2.3-70-g09d2