63 void set_weapon_specifications(std::vector<SDL_Texture *> texture,
int fire_frame = 3,
int fire_cooldown = 0.75,
int max_fire_distance = 6);
86 void fire(
double *position_x,
double *position_y,
double *direction_x,
double *direction_y,
double *plane_x,
double *plane_y, std::vector<std::vector<int>> *world_map, json *sprite, std::vector<Enemy *> *enemies, SDL_Haptic *haptic = NULL);
97 Sample *weapon_sample = NULL;
99 std::vector<SDL_Texture *> weapon_texture;
105 int fire_cooldown = 0.75;
107 int max_fire_distance = 6;
109 double fire_timer = 0.0;
115 bool weapon_sample_complete =
true;
118 double previous_time = 0;
Definition: renderwindow.hpp:16
Definition: sample.hpp:18
Definition: weapon.hpp:18
void set_weapon_specifications(std::vector< SDL_Texture * > texture, int fire_frame=3, int fire_cooldown=0.75, int max_fire_distance=6)
Set the Weapon's specifications.
Definition: weapon.cpp:8
void fire(double *position_x, double *position_y, double *direction_x, double *direction_y, double *plane_x, double *plane_y, std::vector< std::vector< int >> *world_map, json *sprite, std::vector< Enemy * > *enemies, SDL_Haptic *haptic=NULL)
Fire the Weapon.
Definition: weapon.cpp:49
void set_magazine(int value)
Set the Weapon's magazine.
Weapon()
Construct the Weapon object.
Definition: weapon.cpp:5
void render(RenderWindow *window)
Render the weapon to the renderer.
Definition: weapon.cpp:19
int get_capacity()
Get the Weapon's capacity (clip)
void set_capacity(int value)
Set the Weapon's capacity (clip)
void set_audio(Sample *sample)
Set the Weapon's fire sound effect.
Definition: weapon.cpp:15
int get_magazine()
Get the Weapon's magazine.
Contains the header functions for the Enemy Class.
Contains the header functions for the RenderWindow Class.
Contains the header functions for the Enemy Class.