ECS::Entity
Inherits Struct / Value / Object
Сontainer for components. Consists from UInt64 and pointer to World
Constructors
Instance methods
Adds component to the entity.
Will raise if component already exists (and doesn't have Multiple annotation)
Destroys entity removing all components from it. Entity ID is marked as free and can be reused
Destroys entity if it is empty. It is done automatically when last component is removed So the only use case is when you create entity then want to destroy if no components was added to it.
Removes component of type typ from the entity. Will raise if component isn't present on entity
Removes component of type typ from the entity if it exists. Otherwise, do nothing
Deletes component of type typ and add component comp to the entity
Update existing component of same type on the entity. Will raise if component of this type isn't present.