MCPcopy Create free account
hub / github.com/GlobedGD/globed2 / TwoPlayerModule

Method TwoPlayerModule

src/modules/two-player/TwoPlayerModule.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace globed {
16
17TwoPlayerModule::TwoPlayerModule() {
18 NetworkManagerImpl::get().listenGlobal<msg::LevelDataMessage>([](const auto& msg) {
19 auto& mod = TwoPlayerModule::get();
20
21 if (mod.isEnabled()) {
22 for (auto& event : msg.events) {
23 mod.handleEvent(event);
24 }
25 }
26 });
27}
28
29void TwoPlayerModule::onModuleInit() {
30 this->setAutoEnableMode(AutoEnableMode::Level);

Callers

nothing calls this directly

Calls 3

isEnabledMethod · 0.80
getFunction · 0.50
handleEventMethod · 0.45

Tested by

no test coverage detected