diff options
author | hnOsmium0001 <[email protected]> | 2022-05-06 19:52:12 -0700 |
---|---|---|
committer | hnOsmium0001 <[email protected]> | 2022-05-06 19:52:12 -0700 |
commit | d98a4159d86406a47628aa58bae9f3308fea4fd0 (patch) | |
tree | 4b5ee8aef4a099503801ea731e6fb3c724433cdf /source/GameObject.cpp | |
parent | e663fb70fa47764db4576315b78143b6d23ddfa3 (diff) |
Improved camera and various cleanups
Diffstat (limited to 'source/GameObject.cpp')
-rw-r--r-- | source/GameObject.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/GameObject.cpp b/source/GameObject.cpp index bb86acc..0dccf38 100644 --- a/source/GameObject.cpp +++ b/source/GameObject.cpp @@ -124,6 +124,12 @@ GameObject* GameObject::RemoveChild(GameObject* child) { return nullptr; } +void GameObject::RemoveSelfFromParent() { + if (mParent) { + mParent->RemoveChild(this); + } +} + PodVector<GameObject*> GameObject::RemoveAllChildren() { for (auto& child : mChildren) { child->SetParent(nullptr); |