Nymph Game Engine
Chaiscript based Game Engine
|
Class for engine. More...
#include <engine.h>
Public Member Functions | |
Engine ()=delete | |
Engine (const std::string &config_path) | |
Engine constructor. More... | |
virtual | ~Engine ()=default |
Engine destructor. More... | |
void | addScene (std::shared_ptr< Game::Scene > scene) noexcept |
Adds a scene to the engine. More... | |
std::shared_ptr< Game::Scene > | findSceneByName (const std::string &name) noexcept |
Finds a scene by name. More... | |
std::map< std::shared_ptr < Game::Scene >, bool > | getScenes () const noexcept |
Gets the scenes. More... | |
void | activateScene (const std::string &name) |
Activates a scene by name. More... | |
void | deactivateScene (const std::string &name) |
Deactivates a scene by name. More... | |
std::vector< std::string > | getSceneNames () const noexcept |
Gets the scene names. More... | |
std::vector< std::string > | getActiveSceneNames () const noexcept |
Gets the active scene names. More... | |
void | timeToExit () noexcept |
This is to signal the engine that it is time to shut down. More... | |
void | setup () |
Sets up the engine. More... | |
void | mainLoop () |
Triggers the main loop for the engine. More... | |
void | cleanUp () |
Cleans up before exiting. More... | |
Class for engine.
|
delete |
Engine::Engine | ( | const std::string & | config_path | ) |
Engine constructor.
|
virtualdefault |
Engine destructor.
void Engine::activateScene | ( | const std::string & | name | ) |
Activates a scene by name.
[in] | name | The name |
References findSceneByName().
Referenced by generated::getEngineModule().
|
noexcept |
Adds a scene to the engine.
[in] | scene | The scene |
Referenced by generated::getEngineModule().
void Engine::cleanUp | ( | ) |
Cleans up before exiting.
void Engine::deactivateScene | ( | const std::string & | name | ) |
Deactivates a scene by name.
[in] | name | The name |
References findSceneByName().
Referenced by generated::getEngineModule().
|
noexcept |
Finds a scene by name.
[in] | name | The name |
Referenced by activateScene(), deactivateScene(), and generated::getEngineModule().
|
noexcept |
Gets the active scene names.
Referenced by generated::getEngineModule().
|
noexcept |
|
noexcept |
void Engine::mainLoop | ( | ) |
Triggers the main loop for the engine.
void Engine::setup | ( | ) |
Sets up the engine.
References ComponentManager::addComponent(), Utility::ConfigManager::getBool(), Utility::ConfigManager::getFloat(), Utility::ConfigManager::getInt(), Graphics::Camera::getProjectionMatrix(), Utility::ConfigManager::getString(), Component::getTransform(), and Graphics::GraphicsSystem::getWindow().
|
noexcept |
This is to signal the engine that it is time to shut down.
Referenced by generated::getEngineModule().