use core::fmt::Debug;
use bevy_ecs::{entity::Entity, query::QueryData};
use bevy_prng::EntropySource;
use crate::{seed::RngSeed, traits::SeedSource};
#[derive(Debug, QueryData)]
pub struct RngEntity<Rng: EntropySource> {
seed: &'static RngSeed<Rng>,
entity: Entity,
}
impl<Rng: EntropySource> RngEntityItem<'_, '_, Rng> {
#[inline]
pub fn entity(&self) -> Entity {
self.entity
}
#[inline]
pub fn seed(&self) -> &RngSeed<Rng> {
self.seed
}
#[inline]
pub fn clone_seed(&self) -> Rng::Seed {
self.seed.clone_seed()
}
}