restore after broken git
This commit is contained in:
commit
138c62ac34
51 changed files with 7559 additions and 0 deletions
16
src/states/game/systems.rs
Normal file
16
src/states/game/systems.rs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
use bevy::prelude::*;
|
||||
use crate::states::AppState;
|
||||
use crate::states::game::components::GameRestart;
|
||||
|
||||
|
||||
pub fn restart_game_button_system(
|
||||
interaction_query: Query<&Interaction, (Changed<Interaction>, With<GameRestart>)>,
|
||||
mut next_state: ResMut<NextState<AppState>>,
|
||||
) {
|
||||
for interaction in &interaction_query {
|
||||
if matches!(interaction, Interaction::Pressed) {
|
||||
println!("🔄 Кнопка Restart нажата! Переход в Restarting...");
|
||||
next_state.set(AppState::GameRestart);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue