diff --git a/source/items/Weapon.cpp b/source/items/Weapon.cpp index 1e2d696..7caba2a 100755 --- a/source/items/Weapon.cpp +++ b/source/items/Weapon.cpp @@ -12,6 +12,8 @@ #include "../util/Loader.h" #include "../util/ResourceManager.h" +const int Weapon::BULLET_DAMAGE = 10; + Weapon::Weapon(Physical& holder, Collection& collection, b2World& world) : Emitter(collection), mHolder(holder), @@ -34,5 +36,5 @@ Weapon::fire() { std::shared_ptr Weapon::createParticle() { return std::shared_ptr(new Bullet(mHolder.getPosition(), mWorld, mBulletTexture, - mHolder, mHolder.getAngle(), 10)); + mHolder, mHolder.getAngle(), BULLET_DAMAGE)); } diff --git a/source/items/Weapon.h b/source/items/Weapon.h index 795589e..2628fce 100755 --- a/source/items/Weapon.h +++ b/source/items/Weapon.h @@ -32,6 +32,8 @@ protected: // Private variables. private: + static const int BULLET_DAMAGE; + Physical& mHolder; std::shared_ptr mBulletTexture; b2World& mWorld;