diff options
author | mafaldo <mafaldo@heavyhammer.home> | 2018-02-17 00:29:32 +0100 |
---|---|---|
committer | mafaldo <mafaldo@heavyhammer.home> | 2018-02-17 00:29:32 +0100 |
commit | af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3 (patch) | |
tree | 24dcdaa94c20211974fca97e41647ff0dec31923 /src/main/cpp/Bullet.cpp | |
parent | Add cpack directive and update README (diff) | |
download | Subconscious-old-af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3.tar.gz Subconscious-old-af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3.zip |
add Item type, use for MeleeWeapon
Diffstat (limited to '')
-rw-r--r-- | src/main/cpp/Bullet.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/cpp/Bullet.cpp b/src/main/cpp/Bullet.cpp new file mode 100644 index 0000000..c856213 --- /dev/null +++ b/src/main/cpp/Bullet.cpp @@ -0,0 +1,11 @@ +#include "Bullet.hpp" + +bool Bullet::decreaseAmount(int qnt) +{ + if (_amount >= qnt) { + _amount = _amount - qnt; + return true; + } else { + return false; + } +} |