From a67d57e85601c6ebf69c1c6828125470035af393 Mon Sep 17 00:00:00 2001 From: salaaad2 Date: Thu, 6 Jan 2022 23:44:19 +0100 Subject: weapon as an abstract class. now make more weapons --- src/weapon.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/weapon.hpp') diff --git a/src/weapon.hpp b/src/weapon.hpp index 1f4393d..e43b7da 100644 --- a/src/weapon.hpp +++ b/src/weapon.hpp @@ -11,7 +11,8 @@ #include "raylib.h" -class Weapon { +class AWeapon { +protected: Sound shot; Sound reload; @@ -22,10 +23,10 @@ class Weapon { unsigned int const &damage; public: - Weapon(float const &rg, unsigned int const &dmg, unsigned int const & mag, const char *s, const char *r); - ~Weapon(); + AWeapon(float const &rg, unsigned int const &dmg, unsigned int const & mag, const char *s, const char *r); + ~AWeapon(); - int bang(); + virtual int bang() = 0; void refill(); bool empty; -- cgit v1.2.3