diff options
author | salaaad2 <arthurdurant263@gmail.com> | 2022-01-06 23:44:19 +0100 |
---|---|---|
committer | salaaad2 <arthurdurant263@gmail.com> | 2022-01-06 23:44:19 +0100 |
commit | a67d57e85601c6ebf69c1c6828125470035af393 (patch) | |
tree | 0d7b5d60b339e516d11fad7c38f98680724b8fc3 /src/wp_shotty.cpp | |
parent | amazing textures. v0.0.4 (diff) | |
download | threshold-a67d57e85601c6ebf69c1c6828125470035af393.tar.gz threshold-a67d57e85601c6ebf69c1c6828125470035af393.tar.bz2 threshold-a67d57e85601c6ebf69c1c6828125470035af393.tar.xz threshold-a67d57e85601c6ebf69c1c6828125470035af393.tar.zst threshold-a67d57e85601c6ebf69c1c6828125470035af393.zip |
weapon as an abstract class. now make more weapons
Diffstat (limited to 'src/wp_shotty.cpp')
-rw-r--r-- | src/wp_shotty.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/wp_shotty.cpp b/src/wp_shotty.cpp new file mode 100644 index 0000000..13ab834 --- /dev/null +++ b/src/wp_shotty.cpp @@ -0,0 +1,22 @@ +#include "wp_shotty.hpp" + +#include <iostream> + +wp_shotty::wp_shotty(float const &rg, unsigned int const &dmg, unsigned int const & mag, const char *s, const char *r) + : AWeapon(rg, dmg, mag, s, r) +{} + + + +int wp_shotty::bang() +{ + if (barrel == 0) + { + return (1); + } else { + barrel--; + std::cout << "BANG : " << barrel << "shots left" << std::endl; + PlaySound(shot); + return (0); + } +} |