Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
stillonearth committed Jul 7, 2024
1 parent 052a97e commit c5f04b0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn setup_gameplay_music(mut commands: Commands, audio_assets: Res<AudioAssets>,
let handle = audio
.play(audio_assets.mexico.clone())
.looped()
.with_volume(0.003)
.with_volume(0.1)
.handle();
commands.insert_resource(GameplayMusic(handle));
}
Expand Down
3 changes: 2 additions & 1 deletion src/gameover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub fn event_game_over(
}

pub fn event_game_won(
mut ev_game_over: EventReader<GameOverEvent>,
mut ev_game_over: EventReader<GameWinEvent>,
mut q_ui_game_over: Query<(&mut Visibility, &UIGameOver)>,
mut next_state: ResMut<NextState<GameState>>,
audio: Res<Audio>,
Expand Down Expand Up @@ -176,6 +176,7 @@ impl Plugin for GameOverPlugin {
)
.add_systems(OnEnter(GameState::GameOver), draw_ui)
.add_systems(OnExit(GameState::GameOver), despawn_ui)
.add_event::<GameWinEvent>()
.add_event::<GameOverEvent>();
}
}
2 changes: 1 addition & 1 deletion src/loading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct LoadingPlugin;
impl Plugin for LoadingPlugin {
fn build(&self, app: &mut App) {
app.add_loading_state(
LoadingState::new(GameState::Loading).continue_to_state(GameState::GamePlay),
LoadingState::new(GameState::Loading).continue_to_state(GameState::Splash),
);

app.add_collection_to_loading_state::<_, AudioAssets>(GameState::Loading);
Expand Down
3 changes: 0 additions & 3 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ pub struct UIWeaponName;
#[derive(Component)]
pub struct UIHighscore;

#[derive(Component)]
struct UIGameOverButton;

#[derive(Component)]
pub struct UIGamePlay;

Expand Down

0 comments on commit c5f04b0

Please sign in to comment.