// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "dawnlibs.hpp" namespace Dawn { class AssetLoader { public: const std::string name; bool_t loaded = false; /** * Create an abstract Asset object. * * @param name Name of the asset. */ AssetLoader(const std::string name); /** * Virtual function that will be called by the asset manager on a * synchronous basis. This will only trigger if the blocks are false and * the loaded is also false. */ virtual void updateSync() = 0; /** * Virtual function called by the asset manager asynchronously every tick. * This will only trigger if blocks are false and the loaded state is also * false. */ virtual void updateAsync() = 0; /** * Dispose the asset item. */ virtual ~AssetLoader(); }; }