diff options
Diffstat (limited to 'src/ft_bad_boy_actions.c')
-rw-r--r-- | src/ft_bad_boy_actions.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ft_bad_boy_actions.c b/src/ft_bad_boy_actions.c index 3e961fb..c2324bd 100644 --- a/src/ft_bad_boy_actions.c +++ b/src/ft_bad_boy_actions.c @@ -62,6 +62,26 @@ void } void + ft_check_bad_boy_shoot(t_cub *cl) +{ + int8_t i; + + i = 0; + while (i < cl->mlist.sprite_nbr[13]) + { + if (cl->bad_boy[i].does == 2 && cl->bad_boy[i].sleep == 0) + { + cl->sfx[11].sfx_play(cl->sfx); + if (FT_OS == 1) + ft_macos_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl); + else + ft_linux_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl); + } + i++; + } +} + +void ft_bb_fire(t_bad_boy *bl, t_sprite *sl, t_map *ml) { (void)sl; |