summaryrefslogtreecommitdiff
path: root/engine/entities/Entity.ts
diff options
context:
space:
mode:
Diffstat (limited to 'engine/entities/Entity.ts')
-rw-r--r--engine/entities/Entity.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/engine/entities/Entity.ts b/engine/entities/Entity.ts
index ca8d314..b2d875d 100644
--- a/engine/entities/Entity.ts
+++ b/engine/entities/Entity.ts
@@ -1,13 +1,11 @@
import type { Component } from "../components";
export abstract class Entity {
- private static ID = 0;
-
- public readonly id: number;
+ public readonly id: string;
public readonly components: Map<string, Component>;
constructor() {
- this.id = Entity.ID++;
+ this.id = crypto.randomUUID();
this.components = new Map();
}