DeckStacker v1.0
A card manager plugin for Unity games.
 
Loading...
Searching...
No Matches
DeckStacker.DSShuffleAction Class Reference
Inheritance diagram for DeckStacker.DSShuffleAction:
DeckStacker.DSAction

Public Member Functions

 DSShuffleAction (DSStack targetStack_, bool forceTopCardBack_=false)
 
override void Execute ()
 
- Public Member Functions inherited from DeckStacker.DSAction
void Execute ()
 
void Resolve ()
 
string PrintType ()
 

Additional Inherited Members

- Protected Member Functions inherited from DeckStacker.DSAction
void LogAction (string actionMessage)
 
- Protected Attributes inherited from DeckStacker.DSAction
System.Type _type = null
 
bool _actionLogged = false
 

Detailed Description

This action initiates a stack shuffle.
Here are the steps:

  1. Target stack's card list is randomized.
  2. A subset of those cards are then moved out to the sides to visualize / animate the shuffle.
  3. Once the shuffle animation is halfway through with cards sticking out in different directions, the stack is added to the restack list in DSRegistry.
  4. The regular restack code takes it from there and the cards slide into their new order.

Constructor & Destructor Documentation

◆ DSShuffleAction()

DeckStacker.DSShuffleAction.DSShuffleAction ( DSStack targetStack_,
bool forceTopCardBack_ = false )
inline
  • targetStack = the DSStack you want to shuffle
  • forceTopCardBack = smaller stacks have a high probability that the top card will not move in a shuffle, which feels bad in a lot of cases. This bool forces the top card to move in a shuffle.

Member Function Documentation

◆ Execute()

override void DeckStacker.DSShuffleAction.Execute ( )
inline

The documentation for this class was generated from the following file: