Skip to content

Commit

Permalink
fix: battery and audio
Browse files Browse the repository at this point in the history
  • Loading branch information
eerii committed Jul 21, 2024
1 parent 2d4e4b9 commit 71f7f5e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ fn init_play(
match ambient.get_single() {
Ok((entity, ambient)) => {
ambient.play();
ambient.set_volume(1.);
ambient.set_volume(1.5);
cmd.entity(entity).remove::<FadeOut>();
},
Err(_) => {
Expand All @@ -80,7 +80,7 @@ fn init_play(
source: assets.ambient_music.first().unwrap().clone(),
settings: PlaybackSettings {
mode: PlaybackMode::Despawn,
volume: Volume::new(1.),
volume: Volume::new(1.5),
..default()
},
},
Expand Down Expand Up @@ -121,7 +121,7 @@ fn detect_audio_removal(
source: assets.ambient_music[next].clone(),
settings: PlaybackSettings {
mode: PlaybackMode::Despawn,
volume: Volume::new(1.),
volume: Volume::new(1.5),
..default()
},
},
Expand All @@ -137,7 +137,7 @@ fn init_menu(mut cmd: Commands, assets: Res<SoundAssets>) {
source: assets.main_menu.clone(),
settings: PlaybackSettings {
mode: PlaybackMode::Loop,
volume: Volume::new(1.),
volume: Volume::new(1.5),
..default()
},
},
Expand Down
8 changes: 7 additions & 1 deletion src/enemy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,13 @@ fn enemy_type(level: u32) -> EnemyType {
3 => EnemyType::YoungOld,
4 => EnemyType::Man,
5 => EnemyType::Money,
_ => EnemyType::Battery,
_ => {
if level > 5 && level <= 6 {
EnemyType::Battery
} else {
EnemyType::Money
}
},
}
}

Expand Down

0 comments on commit 71f7f5e

Please sign in to comment.