Arch Game Engine  0.2
tile.h
1 #ifndef TILE_H
2 #define TILE_H
3 
4 #include "object.h"
5 
7 class Tile : public Object {
8 private:
9  int value;
10  bool solid;
11 public:
12  Tile();
13  ~Tile();
15  void setValue(int v);
17  int getValue() const { return value; }
19  void setSolid() { solid = true; }
21  void setPassable() { solid = false; }
23  bool isSolid() const { return solid; }
24 };
25 
26 #endif //TILE_H
This class stores information for an Object in the game.
Definition: object.h:12
void setSolid()
Set if the Tile is solid.
Definition: tile.h:19
void setValue(int v)
Set value of the tile. This is used when reading from a map file, etc.
Definition: tile.cpp:5
bool isSolid() const
Check if the Tile is solid.
Definition: tile.h:23
void setPassable()
Set if the Tile is passable (not solid).
Definition: tile.h:21
An Object class that stores the a tile value and name.
Definition: tile.h:7
int getValue() const
Get the value of the Tile.
Definition: tile.h:17