diff --git a/src/comps/core/markers/mod.rs b/src/comps/core/markers/mod.rs index 6622ab1..90ffc00 100644 --- a/src/comps/core/markers/mod.rs +++ b/src/comps/core/markers/mod.rs @@ -2,3 +2,4 @@ pub mod camera; pub mod firearm; pub mod holdable; pub mod player; +pub mod muzzle_flash; \ No newline at end of file diff --git a/src/comps/core/markers/muzzle_flash.rs b/src/comps/core/markers/muzzle_flash.rs new file mode 100644 index 0000000..a593a01 --- /dev/null +++ b/src/comps/core/markers/muzzle_flash.rs @@ -0,0 +1,4 @@ +use bevy::{prelude::Component, time::Timer}; + +#[derive(Component)] +pub struct MuzzleFlashMarker(pub Timer); \ No newline at end of file diff --git a/src/comps/guns/m4a1.rs b/src/comps/guns/m4a1.rs deleted file mode 100644 index 8b13789..0000000 --- a/src/comps/guns/m4a1.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/comps/guns/mod.rs b/src/comps/guns/mod.rs index 1291f9b..e69de29 100644 --- a/src/comps/guns/mod.rs +++ b/src/comps/guns/mod.rs @@ -1 +0,0 @@ -pub mod m4a1; diff --git a/src/logic/core/guns/despawn_shots.rs b/src/logic/core/guns/despawn_shots.rs new file mode 100644 index 0000000..7e242af --- /dev/null +++ b/src/logic/core/guns/despawn_shots.rs @@ -0,0 +1,12 @@ +use bevy::prelude::*; + +use crate::comps::core::markers::muzzle_flash::MuzzleFlashMarker; + +pub fn despawn_muzzle_flashes(mut commands: Commands, mut query: Query<(&mut MuzzleFlashMarker, Entity)>, time: Res