-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBlocks.cpp
More file actions
45 lines (29 loc) · 762 Bytes
/
Blocks.cpp
File metadata and controls
45 lines (29 loc) · 762 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
#include "Blocks.hpp"
sf::Sprite BlockTypes::get_sprite() {
return sprite;
}
void BlockTypes::set_color(sf::Color col) {
sprite.setColor(col);
}
Wall::Wall(): BlockTypes() {
sprite.setTexture(images.walltexture);
set_color(sf::Color::Yellow);
type = BlockType::WALL;
}
Free::Free(): BlockTypes() {
sprite.setTexture(images.backtexture);
set_color(sf::Color::Yellow);
type = BlockType::FREE;
}
Dynblock::Dynblock(): BlockTypes() {
sprite.setTexture(images.blocktexture);
type = BlockType::WALL;
}
Block::Block(): BlockTypes() {
sprite.setTexture(images.blocktexture);
type = BlockType::WALL;
}
Ghost::Ghost(): BlockTypes() {
sprite.setTexture(images.ghosttexture);
type = BlockType::FREE;
}