use super::*;
#[derive(Clone, Copy, Data, Debug, New, PartialEq, PartialOrd)]
pub struct ParticleRng {
#[get(type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub state: u64,
}
#[derive(Clone, Copy, Data, Debug, New, PartialEq, PartialOrd)]
pub struct ParticleConfig {
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
pub emission_rate: f64,
#[get(pub(crate), type(copy))]
pub max_particles: usize,
#[get(type(copy))]
pub lifetime_min: f64,
#[get(type(copy))]
#[get_mut(pub(crate))]
pub lifetime_max: f64,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
pub speed_min: f64,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
pub speed_max: f64,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[set(pub(crate))]
#[get_mut(pub(crate))]
pub(crate) angle: f64,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[set(pub(crate))]
#[get_mut(pub(crate))]
pub(crate) spread: f64,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[get_mut(pub(crate))]
pub gravity: Vector2D,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[set(pub(crate))]
#[get_mut(pub(crate))]
pub(crate) color_start: Color,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[set(pub(crate))]
#[get_mut(pub(crate))]
pub(crate) color_end: Color,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[get_mut(pub(crate))]
pub size_start: f64,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[get_mut(pub(crate))]
pub size_end: f64,
}
#[derive(Clone, Copy, Data, Debug, New, PartialEq, PartialOrd)]
pub struct Particle {
#[get(type(copy))]
#[get_mut(pub(crate))]
pub position: Vector2D,
#[get(type(clone))]
#[get_mut(pub(crate))]
pub velocity: Vector2D,
#[get(pub(crate), type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
pub(crate) age: f64,
#[get(type(copy))]
#[set(pub(crate))]
#[get_mut(pub(crate))]
pub lifetime: f64,
}
#[derive(Clone, Data, Debug, New, PartialEq)]
pub struct ParticleEmitter {
#[get(type(copy))]
#[get_mut(pub(crate))]
pub position: Vector2D,
#[get(type(clone))]
#[get_mut(pub(crate))]
pub config: ParticleConfig,
#[get(type(clone))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
#[new(skip)]
pub particles: Vec<Particle>,
#[get(type(copy))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
#[new(skip)]
pub emit_accumulator: f64,
#[get(pub(crate), type(copy))]
#[new(skip)]
#[get_mut(pub(crate))]
pub active: bool,
#[get(type(copy), pub(crate))]
#[get_mut(pub(crate))]
#[set(pub(crate))]
#[new(skip)]
pub(crate) rng: ParticleRng,
}