aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/shape.rs
blob: 6e11c56d47f82c859166e06546c6ae9188e9ea26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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. }
    }

    pub fn minion() -> Self {
        Shape { radius: 5. }
    }
}