use common::Point2D;
use sprites::SpriteManager;
use NS_PER_FRAME;
-
-macro_rules! point { // because I don't know how to import it from common.rs ...
- ( $x:expr, $y:expr ) => { Point2D { x:$x, y:$y } };
-}
+use point; // defined in common, but loaded from main...
pub type Nanoseconds = u64;
impl AppState for ActiveState {
fn update(&mut self, dt: Nanoseconds) {
- for mut b in &mut self.bolls {
+ for b in &mut self.bolls {
b.update();
}
}
fn render(&self, canvas: &mut Canvas<Window>) {
- for mut b in &self.bolls {
+ for b in &self.bolls {
b.draw(canvas, self.boll_size);
}
}