This script does 2 things:
- Manages any sorting overrides on the stack's Canvas.
- Manages the "topOfPile" card and fakePileImage
#2, above, refers to DeckStacker hiding cards that are in a pile, unless they are defined as the "topOfPile" card. This is to drastically cut down on the amount of overdraw that happens with Pile stacks. The first stationary, opaque card in the stack is rendered, and all cards underneath are hidden.
Additionally, a fakePileImage is needed to make the stack look like it's got cards. Otherwise, you'll just see a single card floating where a Pile stack should be.
This hidden card behavior can be disabled with the renderFullPile flag.
void DeckStacker.DSStackRenderManager.UpdateTopOfPileIndex |
( |
| ) |
|
|
inline |
Used for Piles. This records the last card of the cards list that is not in motion, offset, and / or faded.
To cut down on overdraw, cards in a Pile will not be visible, unless a card is the top card (unless renderFullPile is true).
When cards are added to the stack, they are added to the DSCardManager.cards list before they move into place in the scene, thus this method is required to prevent DeckStacker from hiding cards that are not covered up, yet.