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

Public Member Functions

void TintCard (Color newTint_, float spd_=1f)
 
void TintCard (string newTintKey_, float spd_=1f)
 
void TintCardInstant (Color newTint_)
 
void TintCardInstant (string newTintKey_)
 
void ResetTint (float spd_=1f)
 
void ResetTintInstant ()
 
Color GetCurrentTint ()
 
void UpdateTints (Color newTint_)
 
void UpdateTintLerp (AnimationCurve tintCurve_)
 
void SetTintImagesActive (bool newState_)
 

Properties

List< Image > tintImages [get]
 
Color startTint [get]
 
Color endTint [get]
 
float tintClock [get, set]
 
float tintSpd [get]
 
bool tintDone [get, set]
 

Detailed Description

Helper data for when the DSCardTintManager updates this card.

Member Function Documentation

◆ GetCurrentTint()

Color DeckStacker.DSCardTintHelper.GetCurrentTint ( )
inline

All tint image colors are the same, so this gets the first color in the tintImages list.

◆ ResetTint()

void DeckStacker.DSCardTintHelper.ResetTint ( float spd_ = 1f)
inline

Reseting the tint will make the tint fade out to alpha=0.

  • spd = a multiplier that speeds up or slows down the tint, applied to Time.deltaTime.

◆ ResetTintInstant()

void DeckStacker.DSCardTintHelper.ResetTintInstant ( )
inline

Reseting the tint will make the tint fade out to alpha=0.

  • The tint speed is instant.

◆ SetTintImagesActive()

void DeckStacker.DSCardTintHelper.SetTintImagesActive ( bool newState_)
inline

Activates / Deactivates the tintImages objects.

To reduce overdraw, tint images should be deactivated when not visible.

◆ TintCard() [1/2]

void DeckStacker.DSCardTintHelper.TintCard ( Color newTint_,
float spd_ = 1f )
inline

Call this to gradually animate the card's tint.

  • newTint = the new Color of the card's tint.
  • spd = a multiplier that speeds up or slows down the tint, applied to Time.deltaTime.

◆ TintCard() [2/2]

void DeckStacker.DSCardTintHelper.TintCard ( string newTintKey_,
float spd_ = 1f )
inline

Overload for feeding a tint key, accessing the predefined tints in DSCardTintManager.cardTintSettings.

  • newTintKey = the name of a color tint in the DSCardTintSettingsSO scriptable object.
  • spd = a multiplier that speeds up or slows down the tint, applied to Time.deltaTime.

◆ TintCardInstant() [1/2]

void DeckStacker.DSCardTintHelper.TintCardInstant ( Color newTint_)
inline

Instantly switches the color, instead of doing a lerp.

  • newTint = the new Color of the card's tint.
  • The tint speed is instant.

◆ TintCardInstant() [2/2]

void DeckStacker.DSCardTintHelper.TintCardInstant ( string newTintKey_)
inline

Overload for feeding a tint key, accessing the predefined tints in DSCardTintManager.cardTintSettings.

  • newTintKey = the name of a color tint in the DSCardTintSettingsSO scriptable object.
  • The tint speed is instant.

◆ UpdateTintLerp()

void DeckStacker.DSCardTintHelper.UpdateTintLerp ( AnimationCurve tintCurve_)
inline

Called by the DSCardTintManger to update this card's tint.

◆ UpdateTints()

void DeckStacker.DSCardTintHelper.UpdateTints ( Color newTint_)
inline

Sets the Color on tint images, with a null check.

Property Documentation

◆ endTint

Color DeckStacker.DSCardTintHelper.endTint
get

End value in the color update lerp.

◆ startTint

Color DeckStacker.DSCardTintHelper.startTint
get

Start value in the color update lerp.

◆ tintClock

float DeckStacker.DSCardTintHelper.tintClock
getset

Used to evaluate the color lerp curve.

◆ tintDone

bool DeckStacker.DSCardTintHelper.tintDone
getset

This is true after a tint has been concluded.

◆ tintImages

List<Image> DeckStacker.DSCardTintHelper.tintImages
get

Assign images that tint the card (front and back), here. Order does not matter.

◆ tintSpd

float DeckStacker.DSCardTintHelper.tintSpd
get

This is a multiplier on the clock speed of the tint lerp.


The documentation for this class was generated from the following file: