| 15 | namespace globed { |
| 16 | |
| 17 | TwoPlayerModule::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 | |
| 29 | void TwoPlayerModule::onModuleInit() { |
| 30 | this->setAutoEnableMode(AutoEnableMode::Level); |
nothing calls this directly
no test coverage detected