Init the new project
This commit is contained in:
commit
6c7ec48be9
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/target
|
||||
Cargo.lock
|
||||
7
Cargo.toml
Normal file
7
Cargo.toml
Normal 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
28
src/main.rs
Normal 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());
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user