SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
SceneManager.h
1#pragma once
2
3#include "spark/core/Export.h"
4#include "spark/core/Scene.h"
5
6#include <memory>
7#include <string>
8#include <unordered_map>
9
10namespace spark::core
11{
15 class SPARK_CORE_EXPORT SceneManager final
16 {
17 public:
23 static void RegisterScene(std::string name, std::unique_ptr<core::Scene> scene);
24
29 static void UnregisterScene(const std::string& name);
30
35 static void LoadScene(const std::string& name);
36
43 static std::shared_ptr<core::Scene> Scene(const std::string& name, bool fail = true);
44
48 static void UnregisterAllScenes();
49
50 private:
51 static std::unordered_map<std::string, std::shared_ptr<core::Scene>> s_scenes;
52 };
53}
A class used to manage scenes in the game.
Definition SceneManager.h:16
Definition Scene.h:13