finished test here

This commit is contained in:
Franklin Blanco 2023-11-23 10:18:54 -08:00
parent 44e245cfde
commit 1a7a5e6024
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,8 @@ use std::time::Duration;
use bevy::{prelude::*, render::render_resource::PrimitiveTopology};
use bevy_rapier3d::prelude::*;
use crate::comps::core::{markers::{bullet::BulletMarker, muzzle_flash::MuzzleFlashMarker}, weapons::caliber::Caliber};
use crate::{comps::core::{markers::{bullet::BulletMarker, muzzle_flash::MuzzleFlashMarker}, weapons::caliber::Caliber}, logic::core::player::player_settings::PlayerSettings};
pub fn shoot_bullet(
commands: &mut Commands,
@ -13,6 +14,7 @@ pub fn shoot_bullet(
forward: Vec3,
up: Vec3,
caliber: Caliber,
player_settings: &Res<PlayerSettings>
) {
// Spawn muzzle flash LIGHT
commands.spawn((
@ -37,6 +39,7 @@ pub fn shoot_bullet(
MuzzleFlashMarker(Timer::new(Duration::from_millis(10), TimerMode::Once)),
));
// Spawn Line
commands.spawn(
MaterialMeshBundle {
mesh: {

View File

@ -224,6 +224,7 @@ pub fn capture_hand_usage(
forward,
up,
firearm_data.caliber.clone(),
&resources.player_settings
);
// Increment indexes and timers
player_firing_info.current_round_index += 1;