From aa872f4f35890027e65c930cc9cc603b5db22906 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Sat, 22 Jan 2022 07:39:54 +0100 Subject: Weapons: amazing job adding another weapon salade ! outstanding --- src/weapon.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/weapon.hpp') 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 @@ -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* enemies, Entity* player) = 0; void refill(); + virtual Projectile const& getProjectile() const = 0; + bool empty; unsigned int barrel; + bool hasProjectiles; }; #endif // WEAPON_H_ -- cgit v1.2.3