Represents an interaction where a single card is moved.
More...
#include <InteractionManager.h>
|
|
| CardInteraction (::Game::Card *card, CardStack *stack) |
| |
| void | Do () override |
| | Executes the interaction.
|
| |
| void | Undo () override |
| | Reverts the interaction.
|
| |
| void | Serialize (nlohmann::json &obj) override |
| | Serializes the interaction to JSON.
|
| |
|
|
static CardInteraction * | Load (nlohmann::json &obj) |
| | Loads a card interaction from JSON.
|
| |
|
|
Card * | Card |
| | The card involved in the interaction.
|
| |
|
CardStack * | Stack |
| | Destination stack.
|
| |
|
CardStack * | PreviousStack |
| | Original stack before the move.
|
| |
|
int32 | PreviousIndex |
| | Original index of the card.
|
| |
|
int32 | FlippedCardIndex = -1 |
| | Index of a card flipped during the move, if any.
|
| |
|
InteractionType | Type |
| | Type of the interaction.
|
| |
|
|
static Card * | Grabbed = nullptr |
| | Currently selected card (global state).
|
| |
Represents an interaction where a single card is moved.
◆ Do()
| void Game::CardInteraction::Do |
( |
| ) |
|
|
overridevirtual |
◆ Serialize()
| void Game::CardInteraction::Serialize |
( |
nlohmann::json & | obj | ) |
|
|
overridevirtual |
◆ Undo()
| void Game::CardInteraction::Undo |
( |
| ) |
|
|
overridevirtual |
The documentation for this struct was generated from the following files: