This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 25th, 2014  |  syntax: C++  |  size: 0.77 KB  |  views: 6  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #ifndef GAME_H
  2. #define GAME_H
  3.  
  4. #include <SFML/Graphics.hpp>
  5.  
  6. #include <memory>
  7. #include "carte.h"
  8. #include "camera.h"
  9. #include "editeur.h"
  10. #include "Gui.h"
  11. enum gameState {editorState, menuState};
  12.  
  13. class GameState;
  14.  
  15. class Game
  16. {
  17.     public:
  18.         Game();
  19.  
  20.         void run();
  21.  
  22.  
  23.  
  24.         void changeState(gameState type);
  25.  
  26.  
  27.         sf::Time deltaTime()
  28.         {
  29.             return frameTime;
  30.         }
  31.  
  32.  
  33.         sf::RenderWindow m_window;
  34.  
  35.     private:
  36.         void render();
  37.  
  38.         void manageInput();
  39.  
  40.         void update();
  41.  
  42.     private:
  43.  
  44.         bool m_init;
  45.         int m_screenWidth, m_screenHeight;
  46.         sf::Clock clock;
  47.         sf::Time frameTime;
  48.  
  49.         std::vector<std::unique_ptr<GameState>> states;
  50.  
  51.  
  52. };
  53.  
  54.  
  55. #endif
clone this paste RAW Paste Data