use sdl2::video::WindowContext;
use time::PreciseTime;
-use boll::{Boll, SquareBoll};
+use boll::{Boll, SquareBoll, CircleBoll};
use common::Point2D;
#[macro_use] mod common;
}
Event::KeyDown { keycode: Some(Keycode::KpPlus), .. } => { boll_size = std::cmp::min(boll_size + 1, 32) }
Event::KeyDown { keycode: Some(Keycode::KpMinus), .. } => { boll_size = std::cmp::max(boll_size - 1, 1) }
- Event::MouseMotion { x, y, .. } => { bolls.push(Box::new(SquareBoll {
- pos: point!(x as f64, y as f64),
- vel: point!(0.0, 0.0),
- })) }
+ Event::MouseMotion { x, y, .. } => {
+ bolls.push(Box::new(CircleBoll::new(
+ point!(x as f64, y as f64),
+ point!(0.0, 0.0),
+ )))
+ }
_ => {}
}
}