diff --git a/src/game/scene.rs b/src/game/scene.rs index 43975c7..1c82267 100644 --- a/src/game/scene.rs +++ b/src/game/scene.rs @@ -5,10 +5,4 @@ use crate::AppState; pub(super) fn scene_plugin(app: &mut App) { // app.add_systems(, ) - app.add_systems(Startup, setup_view); -} - -pub(super) fn setup_view(mut commands: Commands) { - commands.spawn(Camera2dBundle::default()); - println!("view setup"); } diff --git a/src/main.rs b/src/main.rs index de1fa33..16d7c90 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,9 +26,14 @@ fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(RapierPhysicsPlugin::::pixels_per_meter(METER)) + .add_systems(Startup, setup_camera) .add_plugins(game_plugin) .init_state::() .init_state::() .insert_state(AppState::InGame) // TODO dont .run(); } + +fn setup_camera(mut commands: Commands) { + commands.spawn(Camera2dBundle::default()); +}