feat: made the world call transparent irrespective of method used
This commit is contained in:
+2
-4
@@ -29,15 +29,13 @@ fn window_conf() -> Conf {
|
|||||||
async fn main() {
|
async fn main() {
|
||||||
let mut cursor = Cursor::default();
|
let mut cursor = Cursor::default();
|
||||||
cursor.handle_mouse();
|
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 {
|
loop {
|
||||||
// world.tick();
|
|
||||||
// world.draw();
|
|
||||||
cursor.draw();
|
cursor.draw();
|
||||||
world.draw();
|
world.draw();
|
||||||
world.tick();
|
world.tick();
|
||||||
world.ticker.next_frame();
|
world.next_frame();
|
||||||
|
|
||||||
next_frame().await
|
next_frame().await
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,3 +55,9 @@ impl<T: Drawable> Drawable for Tick<T> {
|
|||||||
self.ticker.draw()
|
self.ticker.draw()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Tick<crate::world::World> {
|
||||||
|
pub fn next_frame(&mut self) {
|
||||||
|
self.ticker.next_frame()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user