From: Tomas Wenström Date: Sun, 7 Feb 2021 15:44:13 +0000 (+0100) Subject: Removed old code X-Git-Url: http://git.dolda2000.com/gitweb/?p=kaka%2Frust-sdl-test.git;a=commitdiff_plain;h=afc2bb16b6f16b6e18cd756556a37a756dc5bae1 Removed old code --- diff --git a/src/core/game.rs b/src/core/game.rs index 8fbbef0..e7eac23 100644 --- a/src/core/game.rs +++ b/src/core/game.rs @@ -287,23 +287,6 @@ impl Object for Boll { ..*self })); } - // let x = (self.pos.x / lvl.grid.cell_size.width as f64).min(lvl.grid.size.width as f64 - 1.0).max(0.0) as usize; - // let y = (self.pos.y / lvl.grid.cell_size.height as f64).min(lvl.grid.size.height as f64 - 1.0).max(0.0) as usize; - // if lvl.grid.cells[x][y] { - // if self.bounces == 0 { - // return Dead - // } - // self.vel *= -0.25; - // self.pos += self.vel; - // self.bounces -= 1; - // use rand::distributions::{Distribution, Normal}; - // let mut rng = rand::thread_rng(); - // let a = Radians(self.vel.to_radians().0 + Normal::new(0.0, 0.75).sample(&mut rng)); - // objects.push(Box::new(Boll { - // vel: Point::from(a) * Normal::new(1.0, 0.25).sample(&mut rng) * self.vel.length(), - // ..*self - // })); - // } Alive }