use std::time::Duration;
use bevy::{asset::Handle, ecs::component::Component, render::mesh::Mesh, sprite::ColorMaterial, time::{Timer, TimerMode}};
use crate::particles::ParticleEffect;
#[derive(Component)]
pub struct Particle;
#[derive(Component)]
pub struct LifetimeTimer(pub Timer);
impl LifetimeTimer {
pub fn new(lifetime: f32) -> LifetimeTimer {
LifetimeTimer(Timer::new(Duration::from_secs_f32(lifetime), TimerMode::Once))
}
}
#[derive(Component)]
pub struct SpawnDelayTimer(pub Timer);
impl SpawnDelayTimer {
pub fn new(delay: f32) -> SpawnDelayTimer {
SpawnDelayTimer(Timer::new(Duration::from_secs_f32(delay), TimerMode::Once))
}
}
#[derive(Component)]
pub struct CircleMesh(pub Handle<Mesh>, pub Handle<ColorMaterial>);
#[derive(Component)]
pub struct ParentEffect(pub ParticleEffect);