LibGDX - Fade In problem

Hi there,

I’m having a bit of a problem. I’m trying to get the graphics in my screen to fade in from black. The way I have it setup is as so:

Alpha = 0;
fadeIn = false;

(in create)
if(fadeIn == false) fadeIn();

(fadeIn() method)
fadeIn = true;

(render)
if(fadeIn == true) alpha = (float) (alpha + 0.02);
if(alpha == 1) alpha = 1;

The issue is that it just keeps fading in the resetting back to transparent, then fading back in, etc.