Added bullet damage constant.
This commit is contained in:
parent
d1a31cac3e
commit
59cd09ac16
2 changed files with 5 additions and 1 deletions
|
@ -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<Particle>
|
||||
Weapon::createParticle() {
|
||||
return std::shared_ptr<Particle>(new Bullet(mHolder.getPosition(), mWorld, mBulletTexture,
|
||||
mHolder, mHolder.getAngle(), 10));
|
||||
mHolder, mHolder.getAngle(), BULLET_DAMAGE));
|
||||
}
|
||||
|
|
|
@ -32,6 +32,8 @@ protected:
|
|||
|
||||
// Private variables.
|
||||
private:
|
||||
static const int BULLET_DAMAGE;
|
||||
|
||||
Physical& mHolder;
|
||||
std::shared_ptr<sf::Texture> mBulletTexture;
|
||||
b2World& mWorld;
|
||||
|
|
Reference in a new issue