|
|
|
@ -46,6 +46,9 @@ fn main() {
|
|
|
|
camera_follow_bird.run_if(any_component_changed::<Transform>),
|
|
|
|
camera_follow_bird.run_if(any_component_changed::<Transform>),
|
|
|
|
// Pause when the player presses Escape
|
|
|
|
// Pause when the player presses Escape
|
|
|
|
pause_game.run_if(input_just_pressed(KeyCode::Escape)),
|
|
|
|
pause_game.run_if(input_just_pressed(KeyCode::Escape)),
|
|
|
|
|
|
|
|
// Transition out of the pause screen if the player presses space
|
|
|
|
|
|
|
|
un_pause_game.run_if(input_just_pressed(KeyCode::Space))
|
|
|
|
|
|
|
|
.run_if(in_state(PlayerState::Pause)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.run();
|
|
|
|
.run();
|
|
|
|
@ -212,6 +215,12 @@ fn pause_game(
|
|
|
|
next.set(PlayerState::Pause);
|
|
|
|
next.set(PlayerState::Pause);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn un_pause_game(
|
|
|
|
|
|
|
|
mut next: ResMut<NextState<PlayerState>>,
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
next.set(PlayerState::Alive);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Create floor (and ceiling?)
|
|
|
|
// TODO: Create floor (and ceiling?)
|
|
|
|
// Q: Move bird + camera or move world around bird & camera?
|
|
|
|
// Q: Move bird + camera or move world around bird & camera?
|
|
|
|
// TODO: Obstacles
|
|
|
|
// TODO: Obstacles
|
|
|
|
|