game/
game.rs

1use fennel_engine::{
2    ecs::sprite::Sprite, app::AppBuilder
3};
4use specs::{Builder, WorldExt};
5
6#[tokio::main]
7async fn main() -> anyhow::Result<()> {
8    let mut app = AppBuilder::new()
9        .name("game")
10        .dimensions((800, 800))
11        .build()
12        .unwrap();
13
14    app
15        .world
16        .create_entity()
17        .with(Sprite {
18            image: String::from("assets/example.png"),
19            position: (100.0, 100.0)
20        })
21        .build();
22
23    app
24        .world
25        .create_entity()
26        .with(Sprite {
27            image: String::from("assets/example.png"),
28            position: (300.0, 100.0)
29        })
30        .build();
31
32    app.run().await?;
33    Ok(())
34}