diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-09-02 14:40:46 -0600 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2023-09-02 14:40:46 -0600 |
commit | 29ba1c29d7ada13a9e6d475ca880d121a85894ea (patch) | |
tree | 35a2b36191d197cd44b255cb0dcbc32077a212b4 /engine/entities/Entity.ts | |
parent | c551f519cadb8628d58114512770c69b01d80a0c (diff) | |
download | jumpstorm-29ba1c29d7ada13a9e6d475ca880d121a85894ea.tar.gz jumpstorm-29ba1c29d7ada13a9e6d475ca880d121a85894ea.zip |
make next update interval a property on network update component instead of inheritable attribute on entities
Diffstat (limited to 'engine/entities/Entity.ts')
-rw-r--r-- | engine/entities/Entity.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/engine/entities/Entity.ts b/engine/entities/Entity.ts index 7078f79..a7d561c 100644 --- a/engine/entities/Entity.ts +++ b/engine/entities/Entity.ts @@ -1,8 +1,7 @@ import { EntityNames, Floor, Player } from '.'; import { type Component } from '../components'; -const randomId = () => - (performance.now() + Math.random() * 10_000_000).toString(); +const randomId = () => (Math.random() * 1_000_000_000).toString(); export abstract class Entity { public id: string; @@ -59,6 +58,4 @@ export abstract class Entity { public abstract setFrom(args: Record<string, any>): void; public abstract serialize(): Record<string, any>; - - public abstract getNextUpdateInterval(): number; } |