aboutsummaryrefslogtreecommitdiffstats
path: root/src/shared/shape.rs
blob: 6cbc901e9941090b7085ac0817b9d1acfc9881f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use bevy::prelude::*;
use lightyear::prelude::*;
use serde::*;

#[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. }
    }

    pub fn nexus() -> Self {
        Shape { radius: 35. }
    }
}