engine/include/scene_manager.hpp

37 lines
667 B
C++
Raw Normal View History

2023-04-29 14:22:25 +00:00
#ifndef ENGINE_INCLUDE_SCENE_MANAGER_H_
#define ENGINE_INCLUDE_SCENE_MANAGER_H_
2022-11-29 14:22:03 +00:00
2022-11-30 00:46:03 +00:00
#include <memory>
2023-04-29 14:22:25 +00:00
#include <vector>
#include "scene.hpp"
#include "resource_manager.hpp"
2022-11-30 00:46:03 +00:00
2022-11-29 14:22:03 +00:00
namespace engine {
2023-04-29 14:22:25 +00:00
class Application;
class SceneManager {
2022-11-30 00:46:03 +00:00
2023-04-29 14:22:25 +00:00
public:
SceneManager(Application* app);
~SceneManager();
SceneManager(const SceneManager&) = delete;
SceneManager& operator=(const SceneManager&) = delete;
2022-11-29 14:22:03 +00:00
2023-04-29 14:22:25 +00:00
// creates an empty scene and sets it as active
Scene* CreateEmptyScene();
2022-11-29 14:22:03 +00:00
2023-04-29 14:22:25 +00:00
void UpdateActiveScene(float ts);
2022-11-30 10:36:50 +00:00
2023-04-29 14:22:25 +00:00
private:
Application* const app_;
2022-11-30 10:36:50 +00:00
2023-04-29 14:22:25 +00:00
std::vector<std::unique_ptr<Scene>> scenes_;
int active_scene_index_ = -1;
2022-12-20 23:51:04 +00:00
2023-04-29 14:22:25 +00:00
};
2022-11-29 14:22:03 +00:00
2023-04-29 14:22:25 +00:00
} // namespace engine
2022-11-29 14:22:03 +00:00
2023-04-29 14:22:25 +00:00
#endif