Appearance
Handle
Thin wrapper around an entity and its registry.
lua
type ecr.Handle
Properties
registry
The registry the entity belongs to.
Type
luaHandle.registry: Registry
entity
The entity the handle refers to.
Type
luaHandle.entity: entity
Methods
The Handle
class wraps the following registry methods:
- destroy()
- has_none()
- add()
- set()
- patch()
- has()
- get()
- try_get()
- remove()
The set()
method will also return the handle it is called on.
Example
lualocal e = registry:handle() e:set(A, 1) :set(B, 2) print(e:get(A, B)) --> 1, 2