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