diff --git a/src/weapon.rs b/src/weapon.rs index c6820ef..fc120f4 100644 --- a/src/weapon.rs +++ b/src/weapon.rs @@ -1,7 +1,16 @@ +use crate::player::PlayerMarker; use bevy::{ input::{mouse::MouseButtonInput, ElementState}, prelude::*, }; +use bevy_rapier3d::{ + na::Matrix3x1, + physics::RigidBodyHandleComponent, + rapier::{ + dynamics::{RigidBody, RigidBodyBuilder, RigidBodySet}, + geometry::ColliderBuilder, + }, +}; use std::time::Duration; pub struct WeaponPlugin; @@ -10,7 +19,8 @@ impl Plugin for WeaponPlugin { fn build(&self, app: &mut AppBuilder) { app .add_resource(WeaponData::default()) - .add_system(shoot_system.system()); + .add_system(shoot_system.system()) + .add_system(projectile_system.system()); } } @@ -33,6 +43,10 @@ fn shoot_system( mouse_button_events: Res>, time: Res