Advertisement
Guest User

Tile.h

a guest
Nov 25th, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #ifndef TILE_H
  2. #define TILE_H
  3.  
  4. #include <SFML/Graphics.hpp>
  5.  
  6. enum TileState {
  7.     HIDDEN,
  8.     REVEALED,
  9.     VISIBLE
  10. };
  11.  
  12. class Tile {
  13.     private:
  14.         float cx;
  15.         float cy;
  16.         sf::RectangleShape shape;
  17.         sf::Sprite sprite;
  18.         sf::Sprite overlay;
  19.  
  20.         TileState state;
  21.     public:
  22.         static const float TILE_SIZE;
  23.  
  24.         Tile(float x = 0.0f, float y = 0.0f, sf::Texture* texture = NULL);
  25.         virtual ~Tile();
  26.  
  27.         sf::Vector2f GetPosition();
  28.  
  29.         void ChangeState(TileState newState);
  30.         void Draw(sf::RenderWindow* window);
  31. };
  32.  
  33. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement