36 lines
		
	
	
		
			801 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			801 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // Copyright (c) 2024 Dominic Masters
 | |
| // 
 | |
| // This software is released under the MIT License.
 | |
| // https://opensource.org/licenses/MIT
 | |
| 
 | |
| #pragma once
 | |
| #include "JSONLoader.hpp"
 | |
| #include "scene/Scene.hpp"
 | |
| 
 | |
| namespace Dawn {
 | |
|   class LoaderForSceneitems;
 | |
| 
 | |
|   class LoaderForSceneItems :
 | |
|     public AssetLoader,
 | |
|     public std::enable_shared_from_this<LoaderForSceneItems>
 | |
|   {
 | |
|     protected:
 | |
|       std::shared_ptr<JSONLoader> jsonLoader;
 | |
| 
 | |
|       /**
 | |
|        * Loads the dependencies into the context for the data available in
 | |
|        * the jsonLoader.
 | |
|        */
 | |
|       void setupDependencies();
 | |
| 
 | |
|     public:
 | |
|       struct SceneComponentLoadContext ctx;
 | |
| 
 | |
|       LoaderForSceneItems(
 | |
|         const std::shared_ptr<AssetManager> assetManager,
 | |
|         const std::string name
 | |
|       );
 | |
| 
 | |
|       ~LoaderForSceneItems();
 | |
|   };
 | |
| } |