From 20fd6cec7ea518a98a4f74f746293eb77c170267 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 14 Mar 2024 16:10:11 +0100 Subject: feat: shooting --- src/shared/projectile.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/shared/projectile.rs (limited to 'src/shared/projectile.rs') diff --git a/src/shared/projectile.rs b/src/shared/projectile.rs new file mode 100644 index 0000000..59dec30 --- /dev/null +++ b/src/shared/projectile.rs @@ -0,0 +1,17 @@ +use crate::shared::*; + +#[derive(Bundle)] +pub struct ProjectileBundle { + pub projectile: Projectile, + pub position: ProjectilePosition, + pub replicate: Replicate, +} + +#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct Projectile { + pub target_player: PlayerId, + pub source_player: PlayerId, +} + +#[derive(Component, Message, Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct ProjectilePosition(pub Vec2); -- cgit v1.2.3