move camera to main temporarily
This commit is contained in:
parent
e65f8b26ca
commit
1b43d29585
2 changed files with 5 additions and 6 deletions
|
@ -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");
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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());
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue