CSEngine
Loading...
Searching...
No Matches
CSE::SceneMgr Class Reference
Inheritance diagram for CSE::SceneMgr:
CSE::CoreBase

Public Member Functions

void Init () override
 
void Update (float elapsedTime) override
 
void SetScene (Scene *scene)
 
SceneGetCurrentScene () const
 

Detailed Description

Definition at line 8 of file SceneMgr.h.

Member Function Documentation

◆ GetCurrentScene()

Scene * SceneMgr::GetCurrentScene ( ) const

Definition at line 44 of file SceneMgr.cpp.

44 {
45 return m_scene;
46}

◆ Init()

void SceneMgr::Init ( )
overridevirtual

Implements CSE::CoreBase.

Definition at line 13 of file SceneMgr.cpp.

13 {
14 if (m_scene == nullptr) return;
15
16 m_scene->Init();
17}

◆ SetScene()

void SceneMgr::SetScene ( Scene scene)

Definition at line 30 of file SceneMgr.cpp.

30 {
31
32 if (m_scene != nullptr) {
33 m_scene->SetUndestroyable(false);
34 //MemoryMgr::getInstance()->ReleaseObject(m_scene);
35 CORE->GetCore(MemoryMgr)->ExterminateObjects();
36 }
37
38 m_scene = scene;
39
40 if (m_scene != nullptr)
41 m_scene->Init();
42}

◆ Update()

void SceneMgr::Update ( float  elapsedTime)
overridevirtual

Reimplemented from CSE::CoreBase.

Definition at line 20 of file SceneMgr.cpp.

20 {
21
22 if (m_scene == nullptr)
23 return;
24
25 m_scene->Tick(elapsedTime);
26
27}

The documentation for this class was generated from the following files: