diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-21 15:36:05 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-22 03:53:08 +0100 |
commit | 91419fb01ef5dcdc06d9f6774d16d3ccca1e4b57 (patch) | |
tree | a302f2ca0d110579f468b2144b81e24f3aa113a3 /src/shared/shape.rs | |
parent | 445a51c344ecea346051cf59d03b95c98bb28e75 (diff) |
feat: towers
Diffstat (limited to 'src/shared/shape.rs')
-rw-r--r-- | src/shared/shape.rs | 16 |
1 files changed, 16 insertions, 0 deletions
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. } + } +} |