API
EntityComponentSystem.World — Type.WorldA collection of entities and their components.
ECSComponentA representation of an entity component system component.
EntityComponentSystem.EntityKey — Type.EntityKeyA generational index to an entity that will fail in usage if the entity has been destroyed.
EntityComponentSystem.register! — Method.register!(world::World,::Type{C}) where C <: ECSComponentRegisters storage space for a component type.
EntityComponentSystem.createentity! — Method.createentity!(world::World)Allocates an entity and returns an entity key.
EntityComponentSystem.getentity — Method.getentity(world::World,key::EntityKey)Returns entity index if entity key is still valid.
EntityComponentSystem.destroyentity! — Method.destroyentity!(world::World,entity::EntityKey)Deallocates entity and memory if entity key is valid.
EntityComponentSystem.addcomponent! — Method.addcomponent!(world::World,entity::EntityKey,component::C) where C <: ECSComponentAssociate a component with an entity key.
EntityComponentSystem.removecomponent! — Method.removecomponent!(world::World,entity::EntityKey,::Type{C}) where C <: ECSComponentDissociate a component of a specific type with an entity key.
EntityComponentSystem.getcomponent — Method.getcomponent(world::World,entity::EntityKey,::Type{C}) where C <: ECSComponentGet a component of a specific type of an entity key.
EntityComponentSystem.runsystem! — Method.runsystem!(f,world::World,types::Array{DataType,1})For each entity with components of passed in types, call provided function with that entity and components.