diff options
author | rtk0c <[email protected]> | 2022-11-25 17:20:46 -0800 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-11-25 17:20:46 -0800 |
commit | 8e61ebb687bd683755b217ab1f338e5a3f174c25 (patch) | |
tree | fbd0200d51a9edda7c9f02120fe6be373efe492f /source/30-game/World.cpp | |
parent | a0ddfdbcbc6336685362343518770f7bdefd10fe (diff) |
Changeset: 92 Remove unused code & fix warnings
Diffstat (limited to 'source/30-game/World.cpp')
-rw-r--r-- | source/30-game/World.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source/30-game/World.cpp b/source/30-game/World.cpp index 5d3a8c5..83b9a10 100644 --- a/source/30-game/World.cpp +++ b/source/30-game/World.cpp @@ -22,11 +22,6 @@ void CallGameObjectRecursive(GameObject* start, TFunction&& func) { func(obj); } } - -struct DrawCall { - GLuint vao; - GLuint vbo; -}; } // namespace ProjectBrussel_UNITY_ID GameWorld::GameWorld() @@ -46,21 +41,31 @@ const GameObject& GameWorld::GetRoot() const { }; void GameWorld::Awaken() { - if (mAwakened) return; + using namespace ProjectBrussel_UNITY_ID; + + if (mAwakened) { + return; + } - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); }); + CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Awaken(); }); mAwakened = true; } void GameWorld::Resleep() { - if (!mAwakened) return; + using namespace ProjectBrussel_UNITY_ID; + + if (!mAwakened) { + return; + } - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); }); + CallGameObjectRecursive(mRoot, [](GameObject* obj) { obj->Resleep(); }); mAwakened = false; } void GameWorld::Update() { - ProjectBrussel_UNITY_ID::CallGameObjectRecursive(mRoot, [this](GameObject* obj) { + using namespace ProjectBrussel_UNITY_ID; + + CallGameObjectRecursive(mRoot, [this](GameObject* obj) { obj->Update(); }); } |