-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrop.h
40 lines (31 loc) · 925 Bytes
/
drop.h
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
#ifndef DROP_H_INCLUDED
#define DROP_H_INCLUDED
#include <SFML/Graphics.hpp>
#include "image_manager.h"
class Drop
{
public:
Drop(int score, sf::Vector2f position);
//Destrcteur
~Drop();
//Accesseurs publics
unsigned short getScore();
sf::Sprite getSprite();
sf::Vector2f getPosition();
void setPosition(sf::Vector2f position);
short getSpeed() const;
void move(sf::Vector2f position, sf::Vector2f speed);
sf::IntRect getBoundingBox();
private:
//image du drop
sf::Image *m_image;
//Vitesse, score donné au joueur, taille du sprite
int const m_frameWidth, m_frameHeight;
short const m_speed;
unsigned short const m_score;
//Sprite du drop
sf::Sprite sprite;
//Position actuelle du drop
sf::Vector2f m_position;
};
#endif // DROP_H_INCLUDED