diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-14 16:10:11 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-15 02:50:59 +0100 |
commit | 20fd6cec7ea518a98a4f74f746293eb77c170267 (patch) | |
tree | 35fbe74d020f86cc1a1176340ecdba0433b0bbd6 /src/shared/projectile.rs | |
parent | 02750384df3142bda62a7ce0feb08d115aa6af29 (diff) |
feat: shooting
Diffstat (limited to 'src/shared/projectile.rs')
-rw-r--r-- | src/shared/projectile.rs | 17 |
1 files changed, 17 insertions, 0 deletions
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); |