#pragma once
#include "asset/asset.h"
#include "scene.h"
#include "singleton.h"
namespace engineapi {
	struct SceneInfo
	{
		string path;
		Scene* scene = nullptr;
	};
	class SceneManager :public Singleton<SceneManager> {
	protected:
		SceneInfo* curScene = nullptr;
		map<string, SceneInfo*> scenes;
	public:
		Scene* GetScene(const string& name);
		void LoadScene(const string& path, bool switchNow = true);
		void SwitchScene(const string& name);
		void DeleteScene(const string& name);
		void DeleteAllScene();
		void ReloadScene();
		void Render();
		void Update();
		Scene* GetCurScene();
		SceneInfo* GetSceneInfo(const string& name);
	};
}
template<>
engineapi::SceneManager* Singleton<engineapi::SceneManager>::ms_Singleton = nullptr;