-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTile.h
41 lines (33 loc) · 911 Bytes
/
Tile.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
#ifndef __Tile__
#define __Tile__
//#include <SFML\Graphics.hpp>
enum TileBound { Top, Bottom, East, West };//East = Right
enum TileType { SolidBlock, PassThrough, Air, Slope };
class Tile {
public:
Tile();
Tile(int tID, double angle = 0.0, bool isItWater = false);
Tile(int tID, TileType ty = TileType::SolidBlock, double ang = 0.0, bool isItWater = false);
~Tile();
void setAngle(double a);
double getAngle();
TileType getType();
bool collidable();
bool collidable(TileBound b);
int getID();
bool isWater();
void setPosition(int x, int y);
int getPosX();
int getPosY();
private:
//sf::Sprite sprite;
double angle;
int tileID;
bool water;
TileType type;
int posX;
int posY;
/*Represents if there is a collision possible on those bounds*/
bool boundsUp, boundsDown, boundsLeft, boundsRight;//true means a collision is possible
};
#endif