-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTile.cpp
More file actions
27 lines (26 loc) · 759 Bytes
/
Tile.cpp
File metadata and controls
27 lines (26 loc) · 759 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
//
// Created by ita on 10/02/18.
//
#include "Tile.h"
Tile::Tile(TileType type) {
obstacle= nullptr;
size.x=256;
size.y=153,33;
switch(type){
case TileType::floor:
texture.loadFromFile("./texture/map/tile/brick.png");
break;
case TileType::grass:
texture.loadFromFile("./texture/map/tile/grass.png");
break;
case TileType:: wall:
texture.loadFromFile("./texture/map/tile/wall.png");
break;
case TileType ::land:
texture.loadFromFile("./texture/map/tile/dirt.png");
break;
case TileType ::dark:
texture.loadFromFile("./texture/map/tile/blackGrass.jpg");
}
sprite.setTexture(texture);
}