// Copyright (c) 2024 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "asset/AssetLoader.hpp" #include "asset/AssetDataLoader.hpp" #include using json = nlohmann::json; namespace Dawn { enum class JSONLoaderState { INITIAL, LOADING_JSON, DONE }; class JSONLoader : public AssetLoader { protected: AssetDataLoader loader; enum JSONLoaderState state; public: json data; JSONLoader(const std::string name); void updateSync() override; void updateAsync() override; ~JSONLoader(); }; }