diff options
author | Justin Worthe <justin@worthe-it.co.za> | 2018-09-12 21:39:34 +0200 |
---|---|---|
committer | Justin Worthe <justin@worthe-it.co.za> | 2018-09-12 21:39:34 +0200 |
commit | 38caea2a14bb3c205e4c42daa9f11f0f60550360 (patch) | |
tree | c73226397a8334418280ce09fa7caf96c4ae6db8 /src/entities/home.rs | |
parent | 57f412d73a151f7a4fa35feaf249808dcbe5b5dc (diff) |
Changed hitboxed from an 'is a hitbox' to a 'has a hitbox'
Diffstat (limited to 'src/entities/home.rs')
-rw-r--r-- | src/entities/home.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/entities/home.rs b/src/entities/home.rs index 5666a75..5e2ea12 100644 --- a/src/entities/home.rs +++ b/src/entities/home.rs @@ -35,13 +35,10 @@ impl Home { SpriteId::Sleepypug2 } ; } -} -impl CircleHitbox for Home { - fn pos(&self) -> Vec2d { - self.pos - } - fn radius(&self) -> f64 { - 100. + pub fn hitbox(&self) -> Hitbox { + Hitbox::Circle(CircleHitbox{ + pos: self.pos, radius: 100. + }) } } |