| 260 | } |
| 261 | |
| 262 | void TwoPlayerModule::handleEvent(const InEvent& event) { |
| 263 | if (event.is<TwoPlayerLinkRequestEvent>()) { |
| 264 | auto& ev = event.as<TwoPlayerLinkRequestEvent>(); |
| 265 | this->handleLinkEvent(ev); |
| 266 | } else if (event.is<TwoPlayerUnlinkEvent>()) { |
| 267 | auto& ev = event.as<TwoPlayerUnlinkEvent>(); |
| 268 | this->handleUnlinkEvent(ev); |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | void TwoPlayerModule::handleLinkEvent(const TwoPlayerLinkRequestEvent& event) { |
| 273 | // are we already linked? if so, send an unlink if it's a different player (rejecting the link attempt) |
no test coverage detected