Add monster impact sfx
This commit is contained in:
parent
73aa491d24
commit
b2672904c8
4 changed files with 60 additions and 17 deletions
|
|
@ -35,19 +35,22 @@ pub struct SoundEffects {
|
|||
pub whipping: SoundSamples,
|
||||
pub whipping_hit: SoundSamples,
|
||||
pub whipping_hit_end: SoundSamples,
|
||||
pub slow_hit: SoundSamples,
|
||||
pub medium_hit: SoundSamples,
|
||||
pub fast_hit: SoundSamples,
|
||||
rng: RandomNumberGenerator,
|
||||
}
|
||||
|
||||
impl SoundEffects {
|
||||
pub fn new(ss: &SoundOutput) -> Self {
|
||||
pub fn new(sound_output: &SoundOutput) -> Self {
|
||||
Self {
|
||||
startup: ss.render_sound_effect(&SoundEffect {
|
||||
startup: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Sweep(1, 350),
|
||||
duration: Duration::from_secs(1),
|
||||
}],
|
||||
}),
|
||||
step: ss.render_sound_effect(&SoundEffect {
|
||||
step: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![
|
||||
Sound {
|
||||
sound_type: SoundType::Noise(350, 900),
|
||||
|
|
@ -63,7 +66,7 @@ impl SoundEffects {
|
|||
},
|
||||
],
|
||||
}),
|
||||
pickup: ss.render_sound_effect(&SoundEffect {
|
||||
pickup: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![
|
||||
Sound {
|
||||
sound_type: SoundType::Noise(350, 900),
|
||||
|
|
@ -79,7 +82,7 @@ impl SoundEffects {
|
|||
},
|
||||
],
|
||||
}),
|
||||
bad_key: ss.render_sound_effect(&SoundEffect {
|
||||
bad_key: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: iter::once(Sound {
|
||||
sound_type: SoundType::Tone(540),
|
||||
duration: Duration::from_millis(40),
|
||||
|
|
@ -98,7 +101,7 @@ impl SoundEffects {
|
|||
}))
|
||||
.collect(),
|
||||
}),
|
||||
blocked: ss.render_sound_effect(&SoundEffect {
|
||||
blocked: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: (30..=60)
|
||||
.rev()
|
||||
.step_by(6)
|
||||
|
|
@ -108,13 +111,13 @@ impl SoundEffects {
|
|||
})
|
||||
.collect(),
|
||||
}),
|
||||
whipping: ss.render_sound_effect(&SoundEffect {
|
||||
whipping: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Tone(70),
|
||||
duration: Duration::from_secs(3),
|
||||
}],
|
||||
}),
|
||||
whipping_hit: ss.render_sound_effect(&SoundEffect {
|
||||
whipping_hit: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![
|
||||
Sound {
|
||||
sound_type: SoundType::Tone(400),
|
||||
|
|
@ -126,12 +129,30 @@ impl SoundEffects {
|
|||
},
|
||||
],
|
||||
}),
|
||||
whipping_hit_end: ss.render_sound_effect(&SoundEffect {
|
||||
whipping_hit_end: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Tone(400),
|
||||
duration: Duration::from_millis(20),
|
||||
}],
|
||||
}),
|
||||
slow_hit: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Tone(400),
|
||||
duration: Duration::from_millis(25),
|
||||
}],
|
||||
}),
|
||||
medium_hit: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Tone(600),
|
||||
duration: Duration::from_millis(25),
|
||||
}],
|
||||
}),
|
||||
fast_hit: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: vec![Sound {
|
||||
sound_type: SoundType::Tone(800),
|
||||
duration: Duration::from_millis(25),
|
||||
}],
|
||||
}),
|
||||
rng: RandomNumberGenerator::new(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue