From 91419fb01ef5dcdc06d9f6774d16d3ccca1e4b57 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 21 Mar 2024 15:36:05 +0100 Subject: feat: towers --- src/shared/shape.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/shared/shape.rs (limited to 'src/shared/shape.rs') diff --git a/src/shared/shape.rs b/src/shared/shape.rs new file mode 100644 index 0000000..7423375 --- /dev/null +++ b/src/shared/shape.rs @@ -0,0 +1,16 @@ +use crate::shared::*; + +#[derive(Component, Message, Clone, Copy, Serialize, Deserialize, Debug, PartialEq)] +pub struct Shape { + pub radius: f32, +} + +impl Shape { + pub fn player() -> Self { + Shape { radius: 10. } + } + + pub fn tower() -> Self { + Shape { radius: 25. } + } +} -- cgit v1.2.3