DeckStacker v1.0
A card manager plugin for Unity games.
 
Loading...
Searching...
No Matches
DeckStacker.DSCardFlipper Class Reference
Inheritance diagram for DeckStacker.DSCardFlipper:

Public Member Functions

void ResetFlipper ()
 
void FlipCard (float speed_=-1f)
 
void UpdateCardTilt (Vector2 v2)
 
bool IsFlipping ()
 
bool FlipUpComplete ()
 
bool FlipDownComplete ()
 
bool FacingUp ()
 

Properties

string rotationKey [get]
 
DSCardFacing facing [get]
 
DSVector3Curve rotationCurves [get]
 

Detailed Description

Controls the card flipping animations for DeckStacker.

Should be attached to a DSCard prefab.

Member Function Documentation

◆ 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.

Property Documentation

◆ facing

DSCardFacing DeckStacker.DSCardFlipper.facing
get

This enum will define which side of the card should be shown.

◆ rotationCurves

DSVector3Curve DeckStacker.DSCardFlipper.rotationCurves
get

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: