diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:26:58 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-08-29 12:26:58 -0600 |
commit | c551f519cadb8628d58114512770c69b01d80a0c (patch) | |
tree | 714bfcc29702d9c9e7761e1837be522ccd701427 /engine/entities/Player.ts | |
parent | fd1bb1cca9521348ae2849ef30be09264503681e (diff) | |
download | jumpstorm-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.ts | 4 |
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; + } } |