Entity's Keys

You can now give the 'key' component to Entities.

A key will be generated automatically and stored in Entity.key.value.

You can then use this key to fetch the Entity from the World with World:getEntityByKey(key)

The keys are generated with a generator function that can be overriden.
This commit is contained in:
Pablo Ariel Mayobre 2023-02-14 18:14:25 -03:00 committed by Pablo Mayobre
parent 772dd03b78
commit f795fee2c5
No known key found for this signature in database
GPG key ID: 13A2F589D013E0E7
6 changed files with 148 additions and 15 deletions

View file

@ -2,4 +2,5 @@ local PATH = (...):gsub("(%.init)$", "")
return {
serializable = require(PATH..".serializable"),
key = require(PATH..".key"),
}