|
My Project
|
Represents a scene containing multiple GameObjects. Manages creation, destruction, and updating of root GameObjects. More...
#include <Scene.hpp>
Public Member Functions | |
| Scene ()=default | |
| ~Scene () | |
| GameObject * | CreateGameObject () |
| Creates a new GameObject and adds it to the rootObjects list. | |
| void | DestroyGameObject (GameObject *go) |
| Destroys a GameObject and removes it from the scene. | |
| void | Update (float dt) |
| Updates all root GameObjects and their children recursively. | |
| const std::vector< GameObject * > & | GetRootObjects () const |
| Returns a reference to the root GameObjects of the scene. | |
Represents a scene containing multiple GameObjects. Manages creation, destruction, and updating of root GameObjects.
|
default |
| Engine::Scene::~Scene | ( | ) |
| GameObject * Engine::Scene::CreateGameObject | ( | ) |
Creates a new GameObject and adds it to the rootObjects list.
| void Engine::Scene::DestroyGameObject | ( | GameObject * | go | ) |
Destroys a GameObject and removes it from the scene.
| go | Pointer to the GameObject to destroy |
| const std::vector< GameObject * > & Engine::Scene::GetRootObjects | ( | ) | const |
Returns a reference to the root GameObjects of the scene.
| void Engine::Scene::Update | ( | float | dt | ) |
Updates all root GameObjects and their children recursively.
| dt | Delta time in seconds |