diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-03 08:49:33 -0400 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-05-03 08:49:33 -0400 |
commit | d2b7f062a0240bfdc8b84593834fc711c7a53dca (patch) | |
tree | 2406c6b8809933772661204a3f0c2887744d01ce /include | |
parent | afb0ada00a2c50ea541ba6dc93058ccdb0286cdd (diff) | |
parent | 30d454d7ffc102f2503dfa84937e706e6fc01a4b (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include')
-rw-r--r-- | include/inventory.hpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/inventory.hpp b/include/inventory.hpp index c34eadb..552b30c 100644 --- a/include/inventory.hpp +++ b/include/inventory.hpp @@ -113,6 +113,24 @@ public: Sword* clone(); }; +class Arrow : public Item { +private: + // same as sword + float damage; +public: + + // see sword + float getDamage(); + + // sets amount of damage + void setDamage(float d); + + // uses item + int useItem(); + + Arrow *clone(); +}; + /** * Bow class. We use this for shooting bow and arrows */ @@ -124,6 +142,9 @@ public: // returns the amount of damage, see sword float getDamage(); + // sets the amount of damages + void setDamage(float d); + // handles shooting and arrow curving int useItem(); |