summaryrefslogtreecommitdiff
path: root/engine/entities
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-17 22:42:09 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-17 22:42:09 -0600
commit432ce5428f357f31ae090d55c5183b4eccd5a37c (patch)
treea616ff32a1ac2a3f305c089954cdf6e6432f1ad8 /engine/entities
parent1c28e10b860056d85cc07e5a834c4a54eac14563 (diff)
downloadjumpstorm-432ce5428f357f31ae090d55c5183b4eccd5a37c.tar.gz
jumpstorm-432ce5428f357f31ae090d55c5183b4eccd5a37c.zip
increase collision performance _heavily_
Diffstat (limited to 'engine/entities')
-rw-r--r--engine/entities/Floor.ts5
-rw-r--r--engine/entities/Player.ts7
2 files changed, 9 insertions, 3 deletions
diff --git a/engine/entities/Floor.ts b/engine/entities/Floor.ts
index 44587e6..b204ce0 100644
--- a/engine/entities/Floor.ts
+++ b/engine/entities/Floor.ts
@@ -23,7 +23,10 @@ export class Floor extends Entity {
this.addComponent(
new BoundingBox(
- { x: 300, y: 300 },
+ {
+ x: 300,
+ y: 300,
+ },
{ width, height: Floor.spriteSpec.height },
),
);
diff --git a/engine/entities/Player.ts b/engine/entities/Player.ts
index eeddd69..377e0ca 100644
--- a/engine/entities/Player.ts
+++ b/engine/entities/Player.ts
@@ -18,7 +18,7 @@ import { Direction } from "../interfaces";
export class Player extends Entity {
private static MASS: number = 10;
- private static MOI: number = 1000;
+ private static MOI: number = 100;
private static spriteSpec: SpriteSpec = SPRITE_SPECS.get(
Sprites.COFFEE,
@@ -29,7 +29,10 @@ export class Player extends Entity {
this.addComponent(
new BoundingBox(
- { x: 300, y: 100 },
+ {
+ x: 300,
+ y: 100,
+ },
{ width: Player.spriteSpec.width, height: Player.spriteSpec.height },
0,
),