diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-22 07:39:54 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-22 07:39:54 +0100 |
commit | aa872f4f35890027e65c930cc9cc603b5db22906 (patch) | |
tree | 48b53e75fd8ed0ac7bea62c73ddd85975cc47f43 /src/weapon.hpp | |
parent | Parsing: the great rework (tm) finally works as intended (diff) | |
download | threshold-aa872f4f35890027e65c930cc9cc603b5db22906.tar.gz threshold-aa872f4f35890027e65c930cc9cc603b5db22906.tar.bz2 threshold-aa872f4f35890027e65c930cc9cc603b5db22906.tar.xz threshold-aa872f4f35890027e65c930cc9cc603b5db22906.tar.zst threshold-aa872f4f35890027e65c930cc9cc603b5db22906.zip |
Weapons: amazing job adding another weapon salade ! outstanding
Diffstat (limited to 'src/weapon.hpp')
-rw-r--r-- | src/weapon.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/weapon.hpp b/src/weapon.hpp index d7f8df3..5e8fde4 100644 --- a/src/weapon.hpp +++ b/src/weapon.hpp @@ -9,6 +9,7 @@ #ifndef WEAPON_H_ #define WEAPON_H_ +#include "projectile.hpp" #include "raylib.h" #include <iostream> @@ -30,6 +31,8 @@ class AWeapon { unsigned int const damage; const std::string name; + Projectile projectile; + public: AWeapon(float const rg, // range unsigned int const& dmg, // damage @@ -37,14 +40,18 @@ class AWeapon { double const& cooldown, // duh const char* s, // shot sound path const char* r, // reload sound path - std::string const& nm); // name + std::string const& nm, // name + bool const& hasProj); // projectiles ? yea/nay ~AWeapon(); virtual int bang(std::vector<Entity>* enemies, Entity* player) = 0; void refill(); + virtual Projectile const& getProjectile() const = 0; + bool empty; unsigned int barrel; + bool hasProjectiles; }; #endif // WEAPON_H_ |