-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblock.cpp
More file actions
51 lines (42 loc) · 726 Bytes
/
block.cpp
File metadata and controls
51 lines (42 loc) · 726 Bytes
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
#include "block.h"
#include <string>
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <iostream>
Block::Block(int coord_x, int coord_y, int coord_z, int damage, std::string id, std::string texture_file)
{
this->coord_x=coord_x;
this->coord_y=coord_y;
this->coord_z=coord_z;
this->damage=damage;
this->id=id;
this->texture_file=texture_file;
}
Block::~Block()
{
//std::cout<<"Block destroyed!\n";
}
int Block::getX()
{
return this->coord_x;
}
int Block::getY()
{
return this->coord_y;
}
int Block::getZ()
{
return this->coord_z;
}
int Block::getDamage()
{
return this->damage;
}
std::string Block::getId()
{
return this->id;
}
std::string Block::getTexture()
{
return this->texture_file;
}