How can I fade something to clear instead of white?
- by Raven Dreamer
I've got an XNA game which essentially has "floating combat text": short-lived messages that display for a fraction of a second and then disappear.
I've recently added a gradual "fade-away" effect, like so:
public void Update()
{
color.A -= 10;
position.X += 3;
if (color.A <= 10) isDead = true;
}
Where color is the Color int the message displays as. This works as expected, however, it fades the messages to white, which is very noticeable on my indigo background.
Is there some way to fade it to transparent, rather than white? Lerp-ing towards the background color isn't an option, as there's a possibility there will be something between the text and the background, which would simply be the inverse of the current problem.