use core::cell::UnsafeCell;
use bevy_ecs::{
change_detection::Tick,
ptr::ThinSlicePtr,
storage::{ComponentSparseSet, SparseSets},
};
#[derive(Clone, Copy)]
pub(crate) enum ChangeDetectionStorage<'w> {
Uninit,
Table {
ticks: ThinSlicePtr<'w, UnsafeCell<Tick>>,
},
SparseSet {
components: &'w ComponentSparseSet,
},
}
#[derive(Clone, Copy)]
pub struct ChangeDetectionFetch<'w> {
pub(crate) storage: ChangeDetectionStorage<'w>,
pub(crate) sparse_sets: &'w SparseSets,
pub(crate) last_run: Tick,
pub(crate) this_run: Tick,
}