6#include "../Manager/GameObjectMgr.h"
7#include "../Manager/MemoryMgr.h"
15SScene::~SScene() =
default;
18 InitGameObject(m_root);
21void SScene::Tick(
float elapsedTime) {
22 TickGameObject(m_root, elapsedTime);
25void SScene::Destroy() {
26 DestroyGameObjects(m_root);
31 const auto& children = obj->GetChildren();
32 for (
const auto& child : children) {
33 InitGameObject(child);
37void SScene::TickGameObject(
SGameObject* obj,
float elapsedTime) {
38 obj->Tick(elapsedTime);
39 const auto& children = obj->GetChildren();
40 for (
const auto& child : children) {
41 TickGameObject(child, elapsedTime);
46 const auto& children = obj->GetChildren();
47 for (
const auto& child : children) {
48 DestroyGameObjects(child);
51 CORE->GetCore(
MemoryMgr)->ReleaseObject(obj);