Advertisement
Guest User

Untitled

a guest
Jan 25th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.77 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement