mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 09:08:49 +00:00
chore(all): fix warnings
This commit is contained in:
parent
c7f0412eff
commit
81bc1cb790
14 changed files with 471 additions and 513 deletions
|
|
@ -1,17 +1,19 @@
|
|||
use comet::prelude::*;
|
||||
|
||||
// This function will only be called once before the event loop starts.
|
||||
#[allow(unused_variables)]
|
||||
fn setup(app: &mut App, renderer: &mut Renderer2D) {}
|
||||
|
||||
// This function will be called on every tick after the event loop starts.
|
||||
#[allow(unused_variables)]
|
||||
fn update(app: &mut App, renderer: &mut Renderer2D, dt: f32) {}
|
||||
|
||||
fn main() {
|
||||
// This creates a window with the title "Hello world".
|
||||
// Note: You can call your functions differently if you want to though it is advised to use
|
||||
// `setup` and `update` as the names.
|
||||
// You can also replace `Renderer2D` with any other struct that implements the `Renderer` trait.
|
||||
App::new()
|
||||
.with_title("Hello world")
|
||||
.run::<Renderer2D>(setup, update);
|
||||
}
|
||||
// This creates a window with the title "Hello world".
|
||||
// Note: You can call your functions differently if you want to though it is advised to use
|
||||
// `setup` and `update` as the names.
|
||||
// You can also replace `Renderer2D` with any other struct that implements the `Renderer` trait.
|
||||
App::new()
|
||||
.with_title("Hello world")
|
||||
.run::<Renderer2D>(setup, update);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn update(app: &mut App, renderer: &mut Renderer2D, dt: f32) {}
|
||||
|
||||
fn main() {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
|||
);
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn update(app: &mut App, renderer: &mut Renderer2D, dt: f32) {
|
||||
// Getting the windows size
|
||||
let size = renderer.size();
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ fn setup(app: &mut App, renderer: &mut Renderer2D) {
|
|||
app.add_component(e0, render);
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
fn update(app: &mut App, renderer: &mut Renderer2D, dt: f32) {
|
||||
renderer.render_scene_2d(app.scene_mut())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue