![]() |
R-Type
2
Doom but in better
|
Represents a weapon and its attributes in the game. More...
#include <Weapon.hpp>
Data Fields | |
int | damage |
float | fire_rate |
float | cooldown |
bool | shot |
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.
float Weapon::cooldown |
The time, in seconds, before the weapon can fire again after each shot.
Definition at line 14 of file Weapon.hpp.
int Weapon::damage |
The damage dealt by the weapon on each shot.
Definition at line 12 of file Weapon.hpp.
float Weapon::fire_rate |
The rate at which the weapon can fire, in shots per second.
Definition at line 13 of file Weapon.hpp.
bool Weapon::shot |
The state of the firing
Definition at line 15 of file Weapon.hpp.