Static Public Member Functions | |
static void | RunUpdate () |
static void | RunLate () |
static bool | CardsHaveStopped (int cardsInMotionThreshold_=0) |
static void | RemoveFromCardMoverLists (DSCard removeCard_) |
static void | ClearCardMoverLists () |
static void | ExchangeCards (DSCard firstCard_, DSCard secondCard_) |
Static Public Attributes | |
static List< DSCard > | cardsWaitingToBeDealt = new List<DSCard>() |
static List< DSCard > | cardsInMotion = new List<DSCard>() |
static List< DSCard > | cardsOffset = new List<DSCard>() |
static List< DSCard > | cardsRotating = new List<DSCard>() |
static List< DSCard > | cardsScaling = new List<DSCard>() |
static List< DSCard > | cardsGrabbed = new List<DSCard>() |
Properties | |
static float | defaultCardMoveSpd [get] |
static float | cardSpdMod [get, set] |
static float | grabCardSpd [get, set] |
static float | grabCardSpdMod [get, set] |
This script manages card movement.
There are 3 basic categories of card movement:
...and 2 secondary categories of card movement:
|
inlinestatic |
Used in a lot of DSAction code, this checks if any cards are in motion.
If you'd like to specify an acceptable amount of cards that are in motion during some check, you can use cardsInMotionThreshold_.
|
inlinestatic |
Used when unloading or clearing a table / level.
This clears all the lists that DSCardMover manages.
|
inlinestatic |
Takes 2 cards and switches their stack positions, triggering restack(s).
|
inlinestatic |
There are times where you'll need to quickly remove a card from the scene (returning it to a card pool, for example).
This method removes a card from the various lists that DSCardMover manages.
|
inlinestatic |
Called in the DSTableRunner LateUpdate loop.
This triggers the UpdateCardPositions() and acts as the LateUpdate loop for this script.
|
inlinestatic |
Called in the DSTableRunner Update loop.
This triggers the CardQueueManager() and acts as the Update loop for this script.
These are the cards that will have their grab positions updated each LateUpdate.
Grabbed cards refers to cards that are offset in a more fluid or context specific manner. Example: anchoring a card to the cursor.
The base position of a card will remain stationary as a specified parent in the card's hierarchy is moved according to the grab.
These are the cards that will have their positions updated each LateUpdate.
These are the cards that will have their offsets updated each LateUpdate.
These are the cards that will have their rotations updated each LateUpdate.
These are the cards that will have their scales updated each LateUpdate.
Cards that are being moved from one stack to another will be added to this list.
Cards in this list will be gradually added to cardsInMotion after their dealDelay clocks have run out.
|
staticgetset |
This will modify the speed of all card base movement and offset movement. This is put in here for dynamic control of card motion, either by developer or giving the player a fastforward option to make the game more snappy.
|
staticget |
A multiplier on the Time.deltaTime clock speed. Default will carry a card from start to finish in 1/3 of a second.
|
staticgetset |
Controls speed of lerp during grab position updates.
|
staticgetset |
Optional global modifier to grab speed. Easier to reset this to 1, rather than caching the _grabCardSpd value.