summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/StaticCompound/physStaticCompoundMgr.cpp
blob: f5d79b254e4fb5bd430f6937ee393044088246ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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