use bevy::prelude::*;
use crate::VectorGrid;
#[derive(Component)]
pub struct ChunkMap<ItemType> {
chunk_size: usize,
grid: VectorGrid<ItemType>,
}
impl<ItemType> ChunkMap<ItemType> {
pub fn new(chunk_size: usize, grid: VectorGrid<ItemType>) -> Self {
Self { chunk_size, grid }
}
pub fn spawn_chunks(&self, child_builder: &ChildBuilder) {
self.grid.get_chunk_ref(vec![2..5]);
}
}