aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/projectile.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/projectile.rs')
-rw-r--r--src/shared/projectile.rs17
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);