DeckStacker v1.0
A card manager plugin for Unity games.
 
Loading...
Searching...
No Matches
DeckStacker.DSDealCardsBaseAction Class Referenceabstract
Inheritance diagram for DeckStacker.DSDealCardsBaseAction:
DeckStacker.DSAction DeckStacker.DSDealCardsAction DeckStacker.DSDealCardsListAction DeckStacker.DSDealCardsToStackListAction DeckStacker.DSDealSingleCardAction

Public Member Functions

 DSDealCardsBaseAction (float dealDelay_=0f)
 
override void Execute ()
 
- Public Member Functions inherited from DeckStacker.DSAction
void Execute ()
 
void Resolve ()
 
string PrintType ()
 

Protected Member Functions

void AssignBoilerplateDealData (DSCard card)
 
- Protected Member Functions inherited from DeckStacker.DSAction
void LogAction (string actionMessage)
 

Protected Attributes

DSStack _fromStack = null
 
DSStack _targetStack = null
 
float _dealDelay = 0f
 
DSCardPlacementInDeck _stackPlacement = DSCardPlacementInDeck.Undefined
 
int _stackExactPlacement = -1
 
int _cardsInMotionThreshold = 4
 
- Protected Attributes inherited from DeckStacker.DSAction
System.Type _type = null
 
bool _actionLogged = false
 

Properties

DSCardPlacementInDeck stackPlacement [set]
 
int stackExactPlacement [set]
 
int cardsInMotionThreshold [set]
 

Detailed Description

Base abstract class for all Deal Cards actions.

Action code for "dealing" cards between stacks.
A "deal" is when a card is transferred from one stack to another.
Deal actions are designed to have a single origin stack, even when there are multiple target stacks

For optional properties:
Properites defined as "optional" will need to be set through a cached value.

  1. Construct the DSDealCardsBaseAction derived object and save in a variable.
  2. Set any desired optional properties after construction.
  3. Then add the DealCards Action to the DSActionQueue, using DSActionQueue.AddAction().

Constructor & Destructor Documentation

◆ DSDealCardsBaseAction()

DeckStacker.DSDealCardsBaseAction.DSDealCardsBaseAction ( float dealDelay_ = 0f)
inline

A common Constructor for all DSDealCardsBaseAction derived classes.

Member Function Documentation

◆ AssignBoilerplateDealData()

void DeckStacker.DSDealCardsBaseAction.AssignBoilerplateDealData ( DSCard card)
inlineprotected

Boilerplate code for just about every DSDealCardsBaseAction derived class.
This will be called in Execute() methods.

◆ Execute()

override void DeckStacker.DSDealCardsBaseAction.Execute ( )
abstract

To be overridden by derived classes.

Field Documentation

◆ _cardsInMotionThreshold

int DeckStacker.DSDealCardsBaseAction._cardsInMotionThreshold = 4
protected

◆ _dealDelay

float DeckStacker.DSDealCardsBaseAction._dealDelay = 0f
protected

The dealDelay is a clock that runs when a card is at the beginning of the DSCardMove.cardsWaitingToBeDealt queue. Each card will wait that amount of time, in seconds, before being moved to the cardsInMotion queue, which kicks off the card being transferred to its target stack and then moving to its new position in the target stack.

dealDelay is assigned on a per-card basis, but when cards are sent in a batch, the value is applied to all cards in the batch.

◆ _fromStack

DSStack DeckStacker.DSDealCardsBaseAction._fromStack = null
protected

For DealCards Actions that require a stack to deal from.

◆ _stackExactPlacement

int DeckStacker.DSDealCardsBaseAction._stackExactPlacement = -1
protected

Optional Property

This allows the cards to be dealt to a specified index position in the target DSStack.cards list.

◆ _stackPlacement

DSCardPlacementInDeck DeckStacker.DSDealCardsBaseAction._stackPlacement = DSCardPlacementInDeck.Undefined
protected

Optional Property

This allows the cards to be dealt to a specified DSCardPlacementInDeck position in the target stack.

◆ _targetStack

DSStack DeckStacker.DSDealCardsBaseAction._targetStack = null
protected

Most DealCards Actions require a target stack to deal to.

Property Documentation

◆ cardsInMotionThreshold

int DeckStacker.DSDealCardsBaseAction.cardsInMotionThreshold
set

Optional Property

This property tells the card to wait until the DSCardMover.cardsInMotion list is a certain size before being moved out of cardsWaitingToBeDealt.
This has the effect of gradually splaying the cards out when a batch of cards has been dealt to a stack.

◆ stackExactPlacement

int DeckStacker.DSDealCardsBaseAction.stackExactPlacement
set

Optional Property

This allows the cards to be dealt to a specified index position in the target DSStack.cards list.

◆ stackPlacement

DSCardPlacementInDeck DeckStacker.DSDealCardsBaseAction.stackPlacement
set

Optional Property

This allows the cards to be dealt to a specified DSCardPlacementInDeck position in the target stack.


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