diff options
| author | Léo Lam <leo@leolam.fr> | 2022-03-21 23:51:40 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2022-03-22 19:30:14 +0100 |
| commit | c97cf995efbcee49cdda4f4b4cb4921f63670f3f (patch) | |
| tree | 2a8ee1518599cfd05ce100dd84ae526fac40c5f8 /src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp | |
| parent | 7ca13b59388c5eac52dfe5b8299eddbb38cfaa97 (diff) | |
ksys/phys: Add more StaticCompound stuff, part 1
Diffstat (limited to 'src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp')
| -rw-r--r-- | src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
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 |
