MovingEntity的 uuid
(通用唯一标识符)是一个用于标识实体的唯一字符串。它由随机生成的数字和字母组成,不同实体的 uuid
是不同的。
MovingEntity的 uuid
可以通过以下方式使用:
const entity = new MovingEntity();
const uuid = entity.uuid;
以下代码演示了如何使用 uuid
:
const entity1 = new MovingEntity();
const entity2 = new MovingEntity();
console.log(entity1.uuid); // "c1d82b30-55f8-4709-b9d3-60961f74e49e"
console.log(entity2.uuid); // "f0483c18-2212-4222-8f98-36c0e6eaa63a"
uuid
是唯一的,不同实体的 uuid
不相同。uuid
是随机生成的,不同实体的 uuid
是随机的。