From c97cf995efbcee49cdda4f4b4cb4921f63670f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 21 Mar 2022 23:51:40 +0100 Subject: ksys/phys: Add more StaticCompound stuff, part 1 --- .../StaticCompound/physStaticCompoundMgr.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp (limited to 'src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp') diff --git a/src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp b/src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp new file mode 100644 index 00000000..f5d79b25 --- /dev/null +++ b/src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp @@ -0,0 +1,22 @@ +#include "KingSystem/Physics/StaticCompound/physStaticCompoundMgr.h" +#include "KingSystem/Physics/System/physSystem.h" + +namespace ksys::phys { + +StaticCompoundMgr::StaticCompoundMgr() = default; + +StaticCompoundMgr::~StaticCompoundMgr() { + if (mGroupHandler) { + System::instance()->removeSystemGroupHandler(mGroupHandler); + mGroupHandler = nullptr; + } +} + +bool StaticCompoundMgr::init() { + if (!mGroupHandler) + mGroupHandler = System::instance()->addSystemGroupHandler(ContactLayerType::Entity); + + return true; +} + +} // namespace ksys::phys -- cgit v1.2.3