From 29ba1c29d7ada13a9e6d475ca880d121a85894ea Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 2 Sep 2023 14:40:46 -0600 Subject: make next update interval a property on network update component instead of inheritable attribute on entities --- engine/components/BoundingBox.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'engine/components/BoundingBox.ts') diff --git a/engine/components/BoundingBox.ts b/engine/components/BoundingBox.ts index 921feb9..f01ae9b 100644 --- a/engine/components/BoundingBox.ts +++ b/engine/components/BoundingBox.ts @@ -16,6 +16,7 @@ export class BoundingBox extends Component { } public isCollidingWith(box: BoundingBox): boolean { + // optimization; when neither rotates just check if they overlap if (this.rotation == 0 && box.rotation == 0) { const thisTopLeft = this.getTopLeft(); const thisBottomRight = this.getBottomRight(); -- cgit v1.2.3-70-g09d2