move camera to main temporarily

This commit is contained in:
Schrottkatze 2024-11-23 13:49:05 +01:00
parent e65f8b26ca
commit 1b43d29585
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
2 changed files with 5 additions and 6 deletions

View file

@ -5,10 +5,4 @@ use crate::AppState;
pub(super) fn scene_plugin(app: &mut App) { pub(super) fn scene_plugin(app: &mut App) {
// app.add_systems(, ) // app.add_systems(, )
app.add_systems(Startup, setup_view);
}
pub(super) fn setup_view(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
println!("view setup");
} }

View file

@ -26,9 +26,14 @@ fn main() {
App::new() App::new()
.add_plugins(DefaultPlugins) .add_plugins(DefaultPlugins)
.add_plugins(RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(METER)) .add_plugins(RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(METER))
.add_systems(Startup, setup_camera)
.add_plugins(game_plugin) .add_plugins(game_plugin)
.init_state::<AppState>() .init_state::<AppState>()
.init_state::<PausedState>() .init_state::<PausedState>()
.insert_state(AppState::InGame) // TODO dont .insert_state(AppState::InGame) // TODO dont
.run(); .run();
} }
fn setup_camera(mut commands: Commands) {
commands.spawn(Camera2dBundle::default());
}