Hello I recently finished Survival shooter tutorial and I came across some problem. I want my game over text to fade in after i die so i wrote this into my update function
Color targetColor = new Color(255, 0, 0, 255);
if(isDead)
{
gameOver.color = Color.Lerp(gameOver.color, targetColor, 5f * Time.deltaTime);
}
the output of this is that there is no linear transition between color with no alpha and targetColor with alpha 255. What am I missing ? What is solution to make gameOver text slowly appear for 5 second after isDead condition is true ?
Thank you all for help