DoopelPonger
Public Member Functions | Public Attributes | List of all members
CoopFlashSpriteRenderer Class Reference

Used by SchmittyDoop to change the colors of each component when it gets hit by a player. More...

Inheritance diagram for CoopFlashSpriteRenderer:
Inheritance graph
[legend]
Collaboration diagram for CoopFlashSpriteRenderer:
Collaboration graph
[legend]

Public Member Functions

void Awake ()
 Initialize the references used by the class. More...
 
void SetFlashColor (Color color)
 
void LerpColors (float ratio)
 Set the color of the material based on lerping between the flashColor and originalColor and the ratio provided. More...
 
void SwitchColors ()
 Switch which colors that should be used as the base color and the color to lerp to. More...
 
void ResetColors ()
 Set the original color as the base color and the flash color as the color being lerped to. More...
 
void SetAlpha (float alpha)
 

Public Attributes

Color flashColor
 

Detailed Description

Used by SchmittyDoop to change the colors of each component when it gets hit by a player.

This class does not control the ratio between flash color and original color the material should be, it simply changes the color of the material based on the ratio provided in the LerpColors method.

Member Function Documentation

◆ Awake()

void CoopFlashSpriteRenderer.Awake ( )

Initialize the references used by the class.

◆ LerpColors()

void CoopFlashSpriteRenderer.LerpColors ( float  ratio)

Set the color of the material based on lerping between the flashColor and originalColor and the ratio provided.

Parameters
ratioThe color the material should be set to.

◆ ResetColors()

void CoopFlashSpriteRenderer.ResetColors ( )

Set the original color as the base color and the flash color as the color being lerped to.

◆ SetAlpha()

void CoopFlashSpriteRenderer.SetAlpha ( float  alpha)
Parameters
alphaSet the alpha of the material color.

◆ SetFlashColor()

void CoopFlashSpriteRenderer.SetFlashColor ( Color  color)
Parameters
colorSet the color that the material should change to when Schmitty Doop is hit.

◆ SwitchColors()

void CoopFlashSpriteRenderer.SwitchColors ( )

Switch which colors that should be used as the base color and the color to lerp to.

Member Data Documentation

◆ flashColor

Color CoopFlashSpriteRenderer.flashColor

The color that the material will change when Schmitty Doop gets hit.


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