Player hit sound

This commit is contained in:
Linus_Probert 2018-02-16 14:16:21 +01:00
parent f758f162e9
commit 5fce60b44d
7 changed files with 8 additions and 1 deletions

View File

@ -37,7 +37,7 @@ x Fix crash when clicking menu items with pointer
- A different license perhaps?
- Credit screen showing music and graphics guys:
- Music: http://soundimage.org/ (Eric Matyas)
- SFX (Eric Matyas & https://opengameart.org/users/artisticdude)
- SFX (Eric Matyas & https://opengameart.org/users/artisticdude & ZapSplat.com)
- Graphics: (see README)
Legend: ( '-' = future) ( 'x' = completed ) ( 'o' = begun )

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -52,6 +52,9 @@ load_effects(void)
effects[LEVEL_UP] = load_effect("assets/Sounds/FX/level_up.wav");
effects[NEXT_LEVEL] = load_effect("assets/Sounds/FX/next_level.wav");
effects[SPLAT] = load_effect("assets/Sounds/FX/splat.wav");
effects[PLAYER_HIT0] = load_effect("assets/Sounds/FX/fistpunch_vocal_01.wav");
effects[PLAYER_HIT1] = load_effect("assets/Sounds/FX/fistpunch_vocal_02.wav");
effects[PLAYER_HIT2] = load_effect("assets/Sounds/FX/fistpunch_vocal_03.wav");
}
void

View File

@ -28,6 +28,9 @@ typedef enum Fx_t {
LEVEL_UP,
NEXT_LEVEL,
SPLAT,
PLAYER_HIT0,
PLAYER_HIT1,
PLAYER_HIT2,
LAST_EFFECT
} Fx;

View File

@ -331,6 +331,7 @@ player_hit(Player *p, unsigned int dmg)
pos.x += 8;
pos.y += 8;
particle_engine_bloodspray(pos, (Dimension) { 8, 8 }, dmg);
mixer_play_effect(PLAYER_HIT0 + get_random(2));
} else {
p->missText->active = true;
p->hitText->active = false;