Fixed audio tests.

This commit is contained in:
Sam 2020-10-27 17:04:52 -05:00
parent 1a8cf33a60
commit 7971034fde
2 changed files with 22 additions and 8 deletions

View File

@ -23,7 +23,10 @@ fn maps_wield_while_equipping() {
let result = CombatEventMapper::map_event(
&CharacterState::Equipping(states::equipping::Data {
time_left: Duration::from_millis(10),
static_data: states::equipping::StaticData {
buildup_duration: Duration::from_millis(10),
},
timer: Duration::default(),
}),
&PreviousEntityState {
event: SfxEvent::Idle,
@ -77,12 +80,17 @@ fn maps_basic_melee() {
let result = CombatEventMapper::map_event(
&CharacterState::BasicMelee(states::basic_melee::Data {
buildup_duration: Duration::default(),
recover_duration: Duration::default(),
knockback: 0.0,
base_healthchange: 10,
range: 1.0,
max_angle: 1.0,
static_data: states::basic_melee::StaticData {
buildup_duration: Duration::default(),
swing_duration: Duration::default(),
recover_duration: Duration::default(),
base_damage: 10,
knockback: 0.0,
range: 1.0,
max_angle: 1.0,
},
timer: Duration::default(),
stage_section: states::utils::StageSection::Buildup,
exhausted: false,
}),
&PreviousEntityState {

View File

@ -153,7 +153,13 @@ fn does_not_map_run_with_sufficient_velocity_but_not_on_ground() {
fn maps_roll() {
let result = MovementEventMapper::map_movement_event(
&CharacterState::Roll(states::roll::Data {
remaining_duration: Duration::from_millis(300),
static_data: states::roll::StaticData {
buildup_duration: Duration::default(),
movement_duration: Duration::default(),
recover_duration: Duration::default(),
},
timer: Duration::default(),
stage_section: states::utils::StageSection::Buildup,
was_wielded: true,
}),
&PhysicsState {