R-Type  2
Doom but in better
Loading...
Searching...
No Matches
Weapon Struct Reference

Represents a weapon and its attributes in the game. More...

#include <Weapon.hpp>

Collaboration diagram for Weapon:
Collaboration graph

Data Fields

int damage
 
float fire_rate
 
float cooldown
 
bool shot
 

Detailed Description

Represents a weapon and its attributes in the game.

This structure is used to define the properties of a weapon, including its damage, fire rate, and cooldown time. It can be applied to various types of weapons, such as guns or other ranged items, to control how they behave in the game.

Definition at line 11 of file Weapon.hpp.

Field Documentation

◆ cooldown

float Weapon::cooldown

The time, in seconds, before the weapon can fire again after each shot.

Definition at line 14 of file Weapon.hpp.

◆ damage

int Weapon::damage

The damage dealt by the weapon on each shot.

Definition at line 12 of file Weapon.hpp.

◆ fire_rate

float Weapon::fire_rate

The rate at which the weapon can fire, in shots per second.

Definition at line 13 of file Weapon.hpp.

◆ shot

bool Weapon::shot

The state of the firing

Definition at line 15 of file Weapon.hpp.


The documentation for this struct was generated from the following file: