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