This commit is contained in:
LunarAkai 2025-08-04 01:47:13 +02:00
commit ca57bce787
7 changed files with 177 additions and 484 deletions

View file

@ -0,0 +1,15 @@
use anymap::AnyMap;
use crate::generational_index::{GenerationalIndex, GenerationalIndexAllocator, GenerationalIndexArray};
pub mod generational_index;
pub type Entity = GenerationalIndex;
pub type EntityMap<T> = GenerationalIndexArray<T>;
// based on: https://kyren.github.io/2018/09/14/rustconf-talk.html
pub struct ECS {
pub entity_allocator: GenerationalIndexAllocator,
pub entity_components: AnyMap,
pub resources: AnyMap
}