Public Member Functions | |
| void | ChangeRenderOrder (int newOrder_) |
| void | ResetRenderOrder () |
| void | UpdateTopOfPileIndex () |
| DSCard | GetTopOfPileCard () |
Properties | |
| bool | renderFullPile [get, set] |
| int | topOfPileIndex [get] |
This script does 2 things:
#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.
|
inline |
This will change this stack's canvas render order by enabling the "Override Sorting" flag and assigning newOrder as the new Order In Layer.
|
inline |
Easy way of getting the designated top of pile card.
Returns null if _topOfPileIndex == -1
|
inline |
Resets the Order In Layer and override sorting properties of the stack's canvas back to it's original settings.
|
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.
|
getset |
Disables card hiding in pile stacks. This is recomended for piles that will only have a small number of cards in them at any given time. (10 or less)
|
get |
An index of the top card that is not in motion in the stack.
This is used for top of pile visibility.
This index will be -1 in the following cases: