mirror of
https://github.com/csd4ni3l/soundboard.git
synced 2026-01-01 12:33:45 +01:00
My first Rust project's initialization and default modules, plus some starting bevy code.
This commit is contained in:
26
src/main.rs
Normal file
26
src/main.rs
Normal file
@@ -0,0 +1,26 @@
|
||||
use bevy::prelude::*;
|
||||
|
||||
fn spawn_camera(mut commands: Commands) {
|
||||
commands.spawn(Camera2d::default());
|
||||
}
|
||||
|
||||
pub fn setup(mut commands: Commands) {
|
||||
spawn_camera(commands);
|
||||
}
|
||||
|
||||
pub fn update(mut commands: Commands) {
|
||||
|
||||
}
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, update)
|
||||
.run();
|
||||
}
|
||||
|
||||
#[derive(Component)]
|
||||
pub struct Person {
|
||||
pub name: String
|
||||
}
|
||||
Reference in New Issue
Block a user