diff --git a/src/main.rs b/src/main.rs index bd48f22..bea7d84 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,15 +29,13 @@ fn window_conf() -> Conf { async fn main() { let mut cursor = Cursor::default(); cursor.handle_mouse(); - let mut world = world::World::new().every(Duration::from_millis(15)); + let mut world = world::World::new().every(Duration::from_millis(5)); loop { - // world.tick(); - // world.draw(); cursor.draw(); world.draw(); world.tick(); - world.ticker.next_frame(); + world.next_frame(); next_frame().await } diff --git a/src/tick.rs b/src/tick.rs index 5a705de..c2c4229 100644 --- a/src/tick.rs +++ b/src/tick.rs @@ -55,3 +55,9 @@ impl Drawable for Tick { self.ticker.draw() } } + +impl Tick { + pub fn next_frame(&mut self) { + self.ticker.next_frame() + } +}