Expand description
An ECS (Entity Component System) library for Rust that is designed to be easy to use and safe Tailored specifically for ABC-Game-Engine but can be used for any project
Structs§
- Entities
AndComponents - This struct holds all the entities and components in the game engine It is the main way to interact with the game engine, it is seperate from systems for safety reasons
- Entities
AndComponents Thread Safe - This struct is a thread safe version of the EntitiesAndComponents struct It is used to allow systems to access the entities and components in parallel It will not allow any non send sync components to be accessed or added
- Entity
- An entity is a unique identifier for an object in the game engine The entity itself does not hold any data, it is a key to access data from the EntitiesAndComponents struct
- Single
MutEntity - This struct is very similar to the EntitiesAndComponents struct but it only allows access to components on a single entity for safety reasons
- System
Handle - This struct is used to access a specific System in the game engine most of the time you will not need to use this struct
- World
- This struct is the main struct for the game engine
Traits§
- Component
- Components are the data that is stored on entities no need to implement this trait, it is implemented for all ’static types
- Components
Mut - This trait is used to get a tuple of mutable references to components it is automatically implemented for tuples of components
- Components
Ref - This trait is used to get a tuple of references to components it is automatically implemented for tuples of components
- Owned
Components - This trait is used to get a tuple of owned components it is automatically implemented for tuples of components
- Resource
- Resources are objects that are not components and do not have any relation to entities They are a sort of blend between an entity and a system, they have their own update method that is called every frame like a system But unlike a system, they can be accessed by systems
- System
- Systems access and change components on objects Be careful to implement get_allow_entity_based_multithreading as true if you want to use the single_entity_step function If you don’t it will still work but, it will be slower (in most cases)
- TryComponents
Mut - This trait is used to get a tuple of mutable references to components it is automatically implemented for tuples of components
- TryComponents
Ref - This trait is used to get a tuple of references to components it is automatically implemented for tuples of components