use std::time::Duration; use crate::particles::ParticleEffect; use bevy::prelude::ColorMaterial; use bevy::{ asset::Handle, ecs::component::Component, prelude::*, time::{Timer, TimerMode}, }; #[derive(Component)] pub struct Particle; #[derive(Component)] pub struct LifetimeTimer(pub Timer); impl LifetimeTimer { #[allow(dead_code, reason = "ghostly, what is this for?")] 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, pub Handle); #[derive(Component)] pub struct ParentEffect(pub ParticleEffect);