summaryrefslogtreecommitdiff
path: root/src/engine/systems/FacingDirection.ts
diff options
context:
space:
mode:
authorLizzy Hunt <elizabeth.hunt@simponic.xyz>2024-03-09 21:51:22 -0700
committerLizzy Hunt <elizabeth.hunt@simponic.xyz>2024-03-09 21:51:22 -0700
commit42838864af3503f85cabc5dbd73b98a64d20cded (patch)
tree48dd75f0b9fcdc1fb8ec6db5ac2bec0a36b9afe7 /src/engine/systems/FacingDirection.ts
parentce403459fa82025bd969d1938ed4034a10c2e751 (diff)
downloadthe-abstraction-engine-42838864af3503f85cabc5dbd73b98a64d20cded.tar.gz
the-abstraction-engine-42838864af3503f85cabc5dbd73b98a64d20cded.zip
prettier
Diffstat (limited to 'src/engine/systems/FacingDirection.ts')
-rw-r--r--src/engine/systems/FacingDirection.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/systems/FacingDirection.ts b/src/engine/systems/FacingDirection.ts
index 042484a..ee80c67 100644
--- a/src/engine/systems/FacingDirection.ts
+++ b/src/engine/systems/FacingDirection.ts
@@ -32,16 +32,16 @@ export class FacingDirection extends System {
}
const boundingBox = entity.getComponent<BoundingBox>(
- ComponentNames.BoundingBox,
+ ComponentNames.BoundingBox
)!;
const facingDirection = entity.getComponent<FacingDirectionComponent>(
- ComponentNames.FacingDirection,
+ ComponentNames.FacingDirection
);
const { center } = boundingBox;
const angle = Math.atan2(
mousePosition.y - center.y,
- mousePosition.x - center.x,
+ mousePosition.x - center.x
);
const mouseInBoundingBox =
@@ -58,7 +58,7 @@ export class FacingDirection extends System {
sprite.fillTimingsFromSprite(oldSprite);
entity.addComponent(sprite);
- },
+ }
);
}
}