commit 6c7ec48be9dc43decf935d04081574c8267eeca8 Author: thatscringebro Date: Fri Jan 17 16:21:57 2025 -0500 Init the new project 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()); +}