use bevy::prelude::*; use crate::states::AppState; use crate::states::game::components::GameRestart; pub fn restart_game_button_system( interaction_query: Query<&Interaction, (Changed, With)>, mut next_state: ResMut>, ) { for interaction in &interaction_query { if matches!(interaction, Interaction::Pressed) { println!("🔄 Кнопка Restart нажата! Переход в Restarting..."); next_state.set(AppState::GameRestart); } } }