use auto-incremented IDs instead of UUIDs
This commit is contained in:
+3
-1
@@ -4,7 +4,9 @@ import SATX from './satx.js'
|
||||
import Entity from './entity.js'
|
||||
|
||||
export default class Projectile {
|
||||
id = crypto.randomUUID()
|
||||
id = `projectile-${Projectile.nextId()}`
|
||||
static nextId() { return this.#nextUniqueId++ }
|
||||
static #nextUniqueId = 0
|
||||
|
||||
bbox = new Float32Array(4)
|
||||
height = 50
|
||||
|
||||
Reference in New Issue
Block a user