summaryrefslogtreecommitdiff
path: root/engine/entities/Player.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-29 12:26:58 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2023-08-29 12:26:58 -0600
commitc551f519cadb8628d58114512770c69b01d80a0c (patch)
tree714bfcc29702d9c9e7761e1837be522ccd701427 /engine/entities/Player.ts
parentfd1bb1cca9521348ae2849ef30be09264503681e (diff)
downloadjumpstorm-c551f519cadb8628d58114512770c69b01d80a0c.tar.gz
jumpstorm-c551f519cadb8628d58114512770c69b01d80a0c.zip
make server update interval an inheritable trait on entities
Diffstat (limited to 'engine/entities/Player.ts')
-rw-r--r--engine/entities/Player.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/engine/entities/Player.ts b/engine/entities/Player.ts
index a7a41f8..b42fca4 100644
--- a/engine/entities/Player.ts
+++ b/engine/entities/Player.ts
@@ -102,4 +102,8 @@ export class Player extends Entity {
new BoundingBox(center, boundingBox.dimension, boundingBox.rotation)
].forEach((component) => this.addComponent(component));
}
+
+ public getNextUpdateInterval() {
+ return Math.random() * 30 + 50;
+ }
}