feat: add scrolling starfield background
Add 150 stars with randomized positions, sizes, speeds, and brightness. Stars scroll downward with parallax depth effect and wrap around at screen edges. Also fixes Bevy 0.13 API issues in game_state.rs (KeyCode::R → KeyR, Input → ButtonInput).
This commit is contained in:
parent
c9188f58f6
commit
9d80626cc6
7 changed files with 72 additions and 6 deletions
|
|
@ -197,11 +197,10 @@ pub fn start_menu_button_system(
|
|||
}
|
||||
|
||||
pub fn handle_restart_input(
|
||||
mut keyboard_input: ResMut<Input<KeyCode>>,
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
mut restart_resource: ResMut<RestartPressed>,
|
||||
mut app_state: ResMut<NextState<AppState>>,
|
||||
) {
|
||||
if keyboard_input.just_pressed(KeyCode::R) {
|
||||
if keyboard_input.just_pressed(KeyCode::KeyR) {
|
||||
restart_resource.pressed = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue