|
Monad Engine da02fba2
> Undercity Codex_
|
#include <Scene.h>
Public Member Functions | |
| void | Update (float deltaTime) |
| void | Clear () |
| GameObject * | CreateObject (const std::string &name, GameObject *parent=nullptr) |
| GameObject * | CreateObject (const std::string &type, const std::string &name, GameObject *parent=nullptr) |
| template<typename T , typename = typename std::enable_if_t<std::is_base_of_v<GameObject, T>>> | |
| T * | CreateObject (const std::string &name, GameObject *parent=nullptr) |
| bool | SetParent (GameObject *obj, GameObject *parent) |
| void | SetMainCamera (GameObject *camera) |
| GameObject * | GetMainCamera () |
| std::vector< LightData > | CollectLights () |
Static Public Member Functions | |
| static void | RegisterTypes () |
| static std::shared_ptr< Scene > | Load (const std::string &path) |
| GameObject * eng::Scene::CreateObject | ( | const std::string & | name, |
| GameObject * | parent = nullptr |
||
| ) |
Definition at line 65 of file Scene.cpp.
References SetParent().
Referenced by eng::GameObject::LoadGLTF(), eng::ParseGLTFNode(), and Player::Update().
|
inline |
Definition at line 22 of file Scene.h.
References SetParent().
| GameObject * eng::Scene::CreateObject | ( | const std::string & | type, |
| const std::string & | name, | ||
| GameObject * | parent = nullptr |
||
| ) |
Definition at line 81 of file Scene.cpp.
References eng::GameObjectFactory::CreateGameObject(), eng::GameObjectFactory::GetInstance(), eng::GameObject::SetName(), and SetParent().
| GameObject * eng::Scene::GetMainCamera | ( | ) |
|
static |
Definition at line 251 of file Scene.cpp.
References eng::Engine::GetFileSystem(), eng::Engine::GetInstance(), and eng::FileSystem::LoadAssetFileText().
|
static |
Definition at line 17 of file Scene.cpp.
Referenced by eng::Engine::Init().
| void eng::Scene::SetMainCamera | ( | GameObject * | camera | ) |
| bool eng::Scene::SetParent | ( | GameObject * | obj, |
| GameObject * | parent | ||
| ) |
Definition at line 100 of file Scene.cpp.
References eng::GameObject::GetParent(), eng::GameObject::m_children, and eng::GameObject::m_parent.
Referenced by CreateObject(), CreateObject(), eng::GameObject::SetParent(), and Update().
| void eng::Scene::Update | ( | float | deltaTime | ) |
Definition at line 30 of file Scene.cpp.
References SetParent().