use auto-incremented IDs instead of UUIDs

This commit is contained in:
2025-01-19 21:43:27 +09:00
parent e4f1fe19f4
commit 634dde2a3b
9 changed files with 127 additions and 110 deletions
+3 -1
View File
@@ -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