This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/sprites/Tile.h

41 lines
559 B
C
Raw Normal View History

2013-04-29 14:49:16 +00:00
/*
* Tile.h
*
* Created on: 20.04.2013
* Author: Felix
*/
#ifndef DG_TILE_H_
#define DG_TILE_H_
#include "../abstract/Rectangle.h"
2013-04-29 14:49:16 +00:00
/**
* Holds information about a single tile.
*/
class Tile : public Rectangle {
2013-04-29 14:49:16 +00:00
public:
enum class Type : char {
WALL,
FLOOR
2013-04-29 14:49:16 +00:00
};
public:
explicit Tile(Type type, int x, int y);
Type getType() const;
public:
static const Vector2i TILE_SIZE; //< Tile size in pixels.
2013-04-29 14:49:16 +00:00
public:
static std::string getConfig(Type type);
static bool isSolid(Type type);
private:
Type mType;
};
#endif /* DG_TILE_H_ */