4 #[derive(Debug, Clone)]
11 const SPEED: f64 = 75.;
14 pub fn new(x: f64, y: f64, facing: f64) -> Bug {
25 pub fn advance(&mut self, seconds: f64) {
26 self.rotation = (-self.pos).angle();
27 let distance = SPEED*seconds;
28 let delta_pos = Vec2d {
29 x: distance * self.rotation.cos(),
30 y: distance * self.rotation.sin()
32 self.pos = self.pos + delta_pos;
36 impl CircleHitbox for Bug {
37 fn pos(&self) -> Vec2d {
40 fn radius(&self) -> f64 {