Wolf3D
Public Member Functions | List of all members
Pistol Class Reference
Inheritance diagram for Pistol:
Weapon

Public Member Functions

 Pistol ()
 Construct the Pistol object.
 
void init_textures (RenderWindow *window)
 Initilise the Pistol's textures and specifications. More...
 
- Public Member Functions inherited from Weapon
 Weapon ()
 Construct the Weapon object.
 
int get_magazine ()
 Get the Weapon's magazine. More...
 
void set_magazine (int value)
 Set the Weapon's magazine. More...
 
int get_capacity ()
 Get the Weapon's capacity (clip) More...
 
void set_capacity (int value)
 Set the Weapon's capacity (clip) More...
 
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. More...
 
void set_audio (Sample *sample)
 Set the Weapon's fire sound effect. More...
 
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. More...
 
void render (RenderWindow *window)
 Render the weapon to the renderer. More...
 

Member Function Documentation

◆ init_textures()

void Pistol::init_textures ( RenderWindow window)

Initilise the Pistol's textures and specifications.

Parameters
windowRenderWindow Renderer to render too

The documentation for this class was generated from the following files: