diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-04-02 15:36:01 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-04-02 15:36:01 +0200 |
commit | 3b2017b7f4e7d1c932b430fa515286a9ceaf1a92 (patch) | |
tree | 59ea442f69a4428b9b4b00b1fcf16a0827a32524 /src/entities/home.rs | |
parent | eba483718cdc46015a15ab14e5954e1468e209e3 (diff) |
Added hitboxes and something for the bugs to run into
Diffstat (limited to 'src/entities/home.rs')
-rw-r--r-- | src/entities/home.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/entities/home.rs b/src/entities/home.rs new file mode 100644 index 0000000..6f7f53d --- /dev/null +++ b/src/entities/home.rs @@ -0,0 +1,27 @@ +use geometry::*; +use hitbox::*; + +#[derive(Debug, Clone)] +pub struct Home { + pub pos: Vec2d +} + +impl Home { + pub fn new(x: f64, y: f64) -> Home { + Home { + pos: Vec2d { + x: x, + y: y + } + } + } +} + +impl CircleHitbox for Home { + fn pos(&self) -> Vec2d { + self.pos + } + fn radius(&self) -> f64 { + 100. + } +} |