From 6c7ec48be9dc43decf935d04081574c8267eeca8 Mon Sep 17 00:00:00 2001 From: thatscringebro Date: Fri, 17 Jan 2025 16:21:57 -0500 Subject: [PATCH] Init the new project --- .gitignore | 2 ++ Cargo.toml | 7 +++++++ src/main.rs | 28 ++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..96ef6c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +Cargo.lock diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c56594a --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "pea_fighter" +version = "0.1.0" +edition = "2024" + +[dependencies] +bevy = "0.15.1" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e60b280 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,28 @@ +use bevy::prelude::*; + +// Window width and height +const WW: f32 = 1200.0; +const WH: f32 = 700.0; + +fn main() { + App::new() + .add_plugins( + DefaultPlugins + .set(ImagePlugin::default_nearest()) + .set(WindowPlugin { + primary_window: Some(Window { + resizable: true, + focused: true, + resolution: (WW, WH).into(), + ..Default::default() + }), + ..Default::default() + }), + ) + .add_systems(Startup, setup) + .run(); +} + +fn setup(mut commands: Commands) { + commands.spawn(Camera2d::default()); +}