Added bullet damage constant.

This commit is contained in:
Felix Ableitner 2012-09-11 21:15:16 +02:00
parent d1a31cac3e
commit 59cd09ac16
2 changed files with 5 additions and 1 deletions

View file

@ -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));
}

View file

@ -32,6 +32,8 @@ protected:
// Private variables.
private:
static const int BULLET_DAMAGE;
Physical& mHolder;
std::shared_ptr<sf::Texture> mBulletTexture;
b2World& mWorld;