Controls the card flipping animations for DeckStacker.
Should be attached to a DSCard prefab.
◆ FacingUp()
bool DeckStacker.DSCardFlipper.FacingUp |
( |
| ) |
|
|
inline |
Easier to read boolean expression. This is used in a lot of places throughout DeckStacker.
◆ FlipCard()
void DeckStacker.DSCardFlipper.FlipCard |
( |
float | speed_ = -1f | ) |
|
|
inline |
Flips the card.
This method sets the necessary values for the UpdateCardFlip() method to take over and flip the card.
Negative speed numbers are invalid for the purposes of this method.
So, with a default value of -1, we can default to the default flip speed set by DSCardMover (matching card move speed for better syncing).
◆ FlipDownComplete()
bool DeckStacker.DSCardFlipper.FlipDownComplete |
( |
| ) |
|
|
inline |
Returns whether the facing enum matches the rotation, indicating the flip down is complete.
◆ FlipUpComplete()
bool DeckStacker.DSCardFlipper.FlipUpComplete |
( |
| ) |
|
|
inline |
Returns whether the facing enum matches the rotation, indicating the flip up is complete.
◆ IsFlipping()
bool DeckStacker.DSCardFlipper.IsFlipping |
( |
| ) |
|
|
inline |
Returns whether the card is currently animating a flip.
◆ ResetFlipper()
void DeckStacker.DSCardFlipper.ResetFlipper |
( |
| ) |
|
|
inline |
Used when resetting card values, like when being returned to a pool.
◆ UpdateCardTilt()
void DeckStacker.DSCardFlipper.UpdateCardTilt |
( |
Vector2 | v2 | ) |
|
|
inline |
Card tilt happens when the card is moving horizontally.
The Camera Size effects this, due to how the v2 is determined (world positions of cards).
This code is tuned for a Camera Size of 100.
This method is exclusively used by DSCardMover.
◆ facing
This enum will define which side of the card should be shown.
◆ rotationCurves
Curves used in the DSCardMover rotation lerps. The curves used here are defined by the _rotationKey.
◆ rotationKey
string DeckStacker.DSCardFlipper.rotationKey |
|
get |
This key will help grab rotation curves from the DSCardMover.cardMovementSettingsSO scriptable object.
The documentation for this class was generated from the following file: