Init the new project

This commit is contained in:
thatscringebro 2025-01-17 16:21:57 -05:00
commit 6c7ec48be9
3 changed files with 37 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
Cargo.lock

7
Cargo.toml Normal file
View File

@ -0,0 +1,7 @@
[package]
name = "pea_fighter"
version = "0.1.0"
edition = "2024"
[dependencies]
bevy = "0.15.1"

28
src/main.rs Normal file
View File

@ -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());
}