-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProjectile.hpp
45 lines (36 loc) · 863 Bytes
/
Projectile.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef PROJECTILE_HPP
#define PROJECTILE_HPP
#include "Entity.hpp"
#include "ResourceIdentifier.hpp"
#include "DataTables.hpp"
#include "Utility.hpp"
#include <SFML/Graphics.hpp>
class Projectile : public Entity
{
public:
enum Type
{
AlliedBullet,
EnemyBullet,
Missile,
TypeCount
};
static int Count;
public:
Projectile(Type type, const TextureHolder &textures);
~Projectile();
void guideTowards(sf::Vector2f position);
bool isGuided() const;
virtual unsigned int getCategory() const;
virtual sf::FloatRect getBoundingRect() const;
float getMaxSpeed() const;
int getDamage() const;
private:
virtual void updateCurrent(sf::Time dt, CommandQueue &commands);
virtual void drawCurrent(sf::RenderTarget &target, sf::RenderStates states) const;
private:
Type mType;
sf::Sprite mSprite;
sf::Vector2f mTargetDirection;
};
#endif