Implement speed and slow spells
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3129f1be1d
commit
ce05dcb194
9 changed files with 100 additions and 4 deletions
|
|
@ -39,6 +39,8 @@ pub struct SoundEffects {
|
|||
pub medium_hit: SoundSamples,
|
||||
pub fast_hit: SoundSamples,
|
||||
pub pause: SoundSamples,
|
||||
pub speed_time: SoundSamples,
|
||||
pub slow_time: SoundSamples,
|
||||
rng: RandomNumberGenerator,
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +169,23 @@ impl SoundEffects {
|
|||
sounds
|
||||
},
|
||||
}),
|
||||
speed_time: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: (1..=7)
|
||||
.map(|x| Sound {
|
||||
sound_type: SoundType::Tone(x * 50 + 300),
|
||||
duration: Duration::from_millis(x as u64 * 10 + 40),
|
||||
})
|
||||
.collect(),
|
||||
}),
|
||||
slow_time: sound_output.render_sound_effect(&SoundEffect {
|
||||
sounds: (1..=7)
|
||||
.rev()
|
||||
.map(|x| Sound {
|
||||
sound_type: SoundType::Tone(x * 50 + 300),
|
||||
duration: Duration::from_millis(x as u64 * 10 + 40),
|
||||
})
|
||||
.collect(),
|
||||
}),
|
||||
rng: RandomNumberGenerator::new(),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue