chunk rebuilder system

refactoring
This commit is contained in:
2024-05-06 22:26:30 -04:00
parent cd4c9f2acf
commit 58a9f62dca
12 changed files with 195 additions and 41 deletions

View File

@@ -22,4 +22,25 @@ pub struct PhosMap {
}
#[derive(Component)]
pub struct PhosChunk;
pub struct PhosChunk {
pub index: usize,
}
impl PhosChunk {
pub fn new(index: usize) -> Self {
return Self { index };
}
}
#[derive(Resource, Default)]
pub struct PhosChunkRegistry {
pub chunks: Vec<Entity>,
}
impl PhosChunkRegistry {
pub fn new(size: usize) -> Self {
return Self {
chunks: Vec::with_capacity(size),
};
}
}