mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
[Game] Refactor: move setCardAttrHelper to PlayerEventHandler (#6772)
This commit is contained in:
parent
48e21aad38
commit
cdb171f201
6 changed files with 66 additions and 88 deletions
|
|
@ -43,20 +43,6 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, bool _judge, A
|
|||
connect(this, &Player::activeChanged, graphicsItem, &PlayerGraphicsItem::onPlayerActiveChanged);
|
||||
|
||||
connect(this, &Player::openDeckEditor, game->getTab(), &TabGame::openDeckEditor);
|
||||
|
||||
forwardActionSignalsToEventHandler();
|
||||
}
|
||||
|
||||
// Event Handler is the controller i.e. everything hooks up to this to know about player state
|
||||
// Player should forward (private) signals to the event handler
|
||||
|
||||
void Player::forwardActionSignalsToEventHandler()
|
||||
{
|
||||
connect(playerActions, &PlayerActions::logSetTapped, playerEventHandler, &PlayerEventHandler::logSetTapped);
|
||||
connect(playerActions, &PlayerActions::logSetDoesntUntap, playerEventHandler,
|
||||
&PlayerEventHandler::logSetDoesntUntap);
|
||||
connect(playerActions, &PlayerActions::logSetAnnotation, playerEventHandler, &PlayerEventHandler::logSetAnnotation);
|
||||
connect(playerActions, &PlayerActions::logSetPT, playerEventHandler, &PlayerEventHandler::logSetPT);
|
||||
}
|
||||
|
||||
void Player::initializeZones()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue