-
Notifications
You must be signed in to change notification settings - Fork 0
/
Block.h
51 lines (42 loc) · 1.12 KB
/
Block.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
41
42
43
44
45
46
47
48
49
50
51
////////////////////////////////////////////////////////////////////////////////
//
// Cblock : Block.h Block.cpp : Classe definissant les blocks de jeu
//
////////////////////////////////////////////////////////////////////////////////
#ifndef DEF_CLASS_BLOCK
#define DEF_CLASS_BLOCK
#include <string>
#include <SFML/Graphics.hpp>
#include "constants.h"
using namespace sf;
using namespace std;
class Cblock
{
private:
// Attributs
string m_name;
string m_description;
unsigned int m_type; // Type du bloc
unsigned int m_sp; // Points de structure
bool m_grassy;
public:
// Constructeurs
Cblock();
Cblock(unsigned int e_type, string e_name, string e_description, bool e_grassy);
// Methodes
// Getters
string getName();
string getDescription();
unsigned int getType();
unsigned int getSp();
bool isGrassy();
// Setters
void setType(unsigned int e_type);
void setSp(int e_val);
void setGrassy(bool e_grassy);
// Autres methodes
void spDecrease();
void copyFrom(Cblock& e_Block);
void update(); // Met à jour le bloc
};
#endif