diff options
author | rtk0c <[email protected]> | 2022-05-06 19:52:12 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-05-06 19:52:12 -0700 |
commit | cde94efdd44553f3f6575ce84b44c6799e1a1425 (patch) | |
tree | 593b9f280f2e223268f8d5c73f5d1dd1aba50c36 /source/GameObject.cpp | |
parent | 4c9f5ee706faa1435b7dc2f3b6d4753e1289c351 (diff) |
Changeset: 22 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); |