diff options
Diffstat (limited to 'src/game_loop')
-rw-r--r-- | src/game_loop/gameplay.c | 6 | ||||
-rw-r--r-- | src/game_loop/gameplay.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/game_loop/gameplay.c b/src/game_loop/gameplay.c index bc6c98d..521ab85 100644 --- a/src/game_loop/gameplay.c +++ b/src/game_loop/gameplay.c @@ -5,6 +5,7 @@ void hh_gameplay(hh_g_all_levels game, hh_e_game_state* hh_game_state){ static hh_e_gameplay gameplay = hh_e_setup_screen; + static hh_entity* bullets; static hh_entity player1={ .hp = 4, .speed = 6, @@ -50,6 +51,7 @@ void hh_gameplay(hh_g_all_levels game, hh_e_game_state* hh_game_state){ switch (gameplay) { case hh_e_setup_screen: + bullets = hh_init_bullets(10); hh_setup_screen(game.level[game.current_level]); gameplay = hh_e_play_level; break; @@ -57,8 +59,8 @@ void hh_gameplay(hh_g_all_levels game, hh_e_game_state* hh_game_state){ // TODO: here come all the different functions for the gameplay vec_cor cam_pos;//value in tiles cam_pos = hh_draw_screen(player1.pos); - hh_player_actions(&player1,cam_pos); - + hh_player_actions(&player1 ,cam_pos); + hh_multiple_bullets(player1.pos, cam_pos,bullets); // enemy's diff --git a/src/game_loop/gameplay.h b/src/game_loop/gameplay.h index d309e78..fb5637c 100644 --- a/src/game_loop/gameplay.h +++ b/src/game_loop/gameplay.h @@ -1,5 +1,6 @@ #pragma once #include "engine/draw_screen.h" +#include "engine/bullet.h" #include "engine/player_controller.h" #include "engine/sprite_controller.h" #include "game_loop/starting_screen.h" |