5#ifndef DEEPRTS_RESOURCELOADER_H
6#define DEEPRTS_RESOURCELOADER_H
8#include <nlohmann/json.hpp>
14 std::unordered_map<std::string, nlohmann::json>
tileData;
37 static std::string getFilePath(
const std::string& fileName);
40 bool mapLoaded =
false;
43 bool tilesLoaded =
true;
nlohmann::json json
Definition: Websockets.cpp:17
The resourceLoader is primarily used to load maps.
Definition: ResourceLoader.h:24
static TilePropertyData loadMAPJson(const nlohmann::json &tJSON)
Definition: ResourceLoader.cpp:71
TilePropertyData tileData
Definition: ResourceLoader.h:66
nlohmann::json tileJSON
json object of the tile metadata
Definition: ResourceLoader.h:30
static ResourceLoader & getInstance()
Definition: ResourceLoader.h:72
void operator=(ResourceLoader const &)=delete
ResourceLoader(ResourceLoader const &)=delete
void loadMapJSON(const std::string &map_file)
Definition: ResourceLoader.cpp:44
nlohmann::json mapJSON
json object of the map
Definition: ResourceLoader.h:27
Definition: ResourceLoader.h:12
std::unordered_map< int, std::string > tileID2Type
Definition: ResourceLoader.h:13
nlohmann::json & getTileData(int tileID)
Definition: ResourceLoader.h:16
std::unordered_map< std::string, nlohmann::json > tileData
Definition: ResourceLoader.h:14