From 485ed850c2a55a4a953fa738d0607d586cdbc6af Mon Sep 17 00:00:00 2001 From: 0xVB Date: Sun, 25 Aug 2024 04:42:07 +0300 Subject: [PATCH] Forgot to add a way to delete associations --- include/Lunacy/GameObject.h | 1 + src/Lunacy/GameObject.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/Lunacy/GameObject.h b/include/Lunacy/GameObject.h index efa8228..49f0206 100644 --- a/include/Lunacy/GameObject.h +++ b/include/Lunacy/GameObject.h @@ -74,6 +74,7 @@ class GameObject void SetPointer(std::string Name, void*); void* GetPointer(std::string Name); + void DestroyFields(); protected: void ConstructGameObject(); diff --git a/src/Lunacy/GameObject.cpp b/src/Lunacy/GameObject.cpp index 1c29b30..7fb3115 100644 --- a/src/Lunacy/GameObject.cpp +++ b/src/Lunacy/GameObject.cpp @@ -166,4 +166,9 @@ void* GameObject::GetPointer(std::string N) { return GetManager()->Get(N).Pointer; } + +void GameObject::DestroyFields() +{ + DeleteAssociation(_cave); +} #pragma endregion