Advertisement
Guest User

Untitled

a guest
Feb 13th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.36 KB | None | 0 0
  1. #include "AssetManager.h"
  2. #include "World.h"
  3. #include <iostream>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. std::map<string,Texture> AssetManager::textures;
  9.  
  10. sf::Texture AssetManager::manageTexture(string path)
  11. {
  12.     if (textures.find(path) != textures.end())
  13.     {
  14.         return textures[path];
  15.     }
  16.  
  17.     textures[path].loadFromFile(path);
  18.     return textures[path];
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement