fork download
  1. #ifndef TEXTUREMANAGER_H
  2. #define TEXTUREMANAGER_H
  3.  
  4. #include "SFML/Graphics.hpp"
  5. #include <string>
  6. #include <vector>
  7. #include <memory>
  8.  
  9. class TextureManager
  10. {
  11. private:
  12. static TextureManager* instance;
  13. void InitialiseInstence();
  14.  
  15. TextureManager() {}
  16. TextureManager(const TextureManager&){}
  17. ~TextureManager();
  18.  
  19. sf::Texture * tSpriteSheet;
  20. sf::Texture * tSpriteSheetAlpha;
  21. sf::Texture * tBackGrounds;
  22. sf::Texture * tSplashScreen;
  23.  
  24. std::string NtSpriteSheet;
  25. std::string NtSpriteSheetAlpha;
  26. std::string NtBackgrndSheet;
  27. std::string NtSplashScreen;
  28.  
  29. public:
  30. static TextureManager& getInstance();
  31. static void destroy();
  32.  
  33. // Functions to access the textures
  34. sf::Texture * rSpriteSheet();
  35. sf::Texture * rSpriteSheetAlpha();
  36. sf::Texture * rBackGrounds();
  37. sf::Texture * rSplashScreen();
  38. };
  39.  
  40. #endif //TEXTUREMANAGER_H
  41.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty