13#include "VEX/VEX_export.h"
53const std::vector<std::shared_ptr<GameObject>>&
GetAllObjects(
const std::string& scene)
const {
return m_scenes.at(scene)->GetAllObjects(); }
58const std::vector<std::shared_ptr<GameObject>>&
GetAllAddedObjects(
const std::string& scene)
const {
return m_scenes.at(scene)->GetAllAddedObjects(); }
63std::vector<std::string> GetAllSceneNames()
const;
74 if(m_scenes.contains(scene)){
75 return m_scenes.at(scene).get();
81std::map<std::string, std::shared_ptr<Scene>> m_scenes;
82std::string lastSceneName =
"";
84bool m_isUpdating =
false;
85std::vector<std::function<void()>> m_pendingActions;
This file defines SceneManager class.
Class for interaction with engine systems.
SceneManager class implements scene management functionality like loading and unloading scenes,...
void unloadScene(const std::string &path)
Unloads a specific scene from memory.
void loadScene(const std::string &path, Engine &engine)
Unloads all current scenes and loads a new one from a file.
const std::vector< std::shared_ptr< GameObject > > & GetAllObjects(const std::string &scene) const
Function to get all game objects.
Scene * GetScene(const std::string &scene) const
Safely retrieves a pointer to a specific Scene.
std::string getLastSceneName() const
Function to get last scene name.
const std::vector< std::shared_ptr< GameObject > > & GetAllAddedObjects(const std::string &scene) const
Function to get all added game objects.
void loadSceneWithoutClearing(const std::string &path, Engine &engine)
Loads a scene from a file additively without clearing existing scenes.
void scenesUpdate(float deltaTime)
Updates all currently loaded scenes.
void clearScenes(Engine &engine)
Function to clear the current scene.
Scene class implements scene functionality like loading and holding game objects.