aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp/Bullet.cpp
diff options
context:
space:
mode:
authormafaldo <mafaldo@heavyhammer.home>2018-02-17 00:29:32 +0100
committermafaldo <mafaldo@heavyhammer.home>2018-02-17 00:29:32 +0100
commitaf3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3 (patch)
tree24dcdaa94c20211974fca97e41647ff0dec31923 /src/main/cpp/Bullet.cpp
parentAdd cpack directive and update README (diff)
downloadSubconscious-old-af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3.tar.gz
Subconscious-old-af3e76c5ee367ceffb78fa4a8ffc0eadf90e5de3.zip
add Item type, use for MeleeWeapon
Diffstat (limited to '')
-rw-r--r--src/main/cpp/Bullet.cpp11
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;
+ }
+}