diff options
author | Lizzy Hunt <lizzy.hunt@usu.edu> | 2023-08-16 15:41:35 -0600 |
---|---|---|
committer | Lizzy Hunt <lizzy.hunt@usu.edu> | 2023-08-16 15:41:35 -0600 |
commit | 1c28e10b860056d85cc07e5a834c4a54eac14563 (patch) | |
tree | 8057cbda0336474c3e27cc1de5ac35502e5daff7 /engine/structures/QuadTree.ts | |
parent | 732fe6f4811cc082bf938fed2d28c1f9c8bbd1f6 (diff) | |
download | jumpstorm-1c28e10b860056d85cc07e5a834c4a54eac14563.tar.gz jumpstorm-1c28e10b860056d85cc07e5a834c4a54eac14563.zip |
refactor collision methods, rescaffold server
Diffstat (limited to 'engine/structures/QuadTree.ts')
-rw-r--r-- | engine/structures/QuadTree.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/structures/QuadTree.ts b/engine/structures/QuadTree.ts index 49afdad..e6e29fa 100644 --- a/engine/structures/QuadTree.ts +++ b/engine/structures/QuadTree.ts @@ -1,6 +1,6 @@ import type { Coord2D, Dimension2D } from "../interfaces"; -interface BoxedEntry { +export interface BoxedEntry { id: string; dimension: Dimension2D; center: Coord2D; @@ -170,4 +170,12 @@ export class QuadTree { private hasChildren() { return this.children && this.children.size > 0; } + + public setTopLeft(topLeft: Coord2D) { + this.topLeft = topLeft; + } + + public setDimension(dimension: Dimension2D) { + this.dimension = dimension; + } } |