From 38caea2a14bb3c205e4c42daa9f11f0f60550360 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 12 Sep 2018 21:39:34 +0200 Subject: Changed hitboxed from an 'is a hitbox' to a 'has a hitbox' --- src/entities/home.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/entities/home.rs') 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. + }) } } -- cgit v1.2.3