This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/effects/Bullet.h
2013-03-29 18:34:51 +01:00

38 lines
738 B
C++
Executable file

/*
* Bullet.h
*
* Created on: 12.08.2012
* Author: Felix
*/
#ifndef DG_BULLET_H_
#define DG_BULLET_H_
#include "../particle/Particle.h"
class Yaml;
/**
* Bullet particle fired by a weapon, may damage actors.
*/
class Bullet : public Particle {
// Public functions.
public:
Bullet(const sf::Vector2f& position, Sprite& shooter, float direction,
const Yaml& config);
void onCollide(std::shared_ptr<Sprite> other);
// Private variables.
private:
static const std::string KEY_DAMAGE;
static const int DEFAULT_DAMAGE;
static const std::string KEY_SPEED;
static const float DEFAULT_SPEED;
Sprite& mShooter;
const int mDamage;
const float mSpeed;
};
#endif /* DG_BULLET_H_ */