So I have 1 sprite drawn on the screen, it is acting as an
"intro" so what i want it to do is fade in, then fade out. It fades in perfectly, but it wont fade out. I set many breakpoints in the code and the loops are working as they should, but for some reason the alpha is not being changed in the 2nd loop.
dbSetSprite (1, 1, 1);
dbSprite (1,0,0,1);
dbSetSpriteAlpha ( 1, 0 );
for(int i=0; i<50; i++)
{
dbSleep(50);
dbSetSpriteAlpha(1,i);
dbSync ( );
if (i==49)
{
break;
}
}
// dbSleep(1000);
for(int i=50; i>1; i--)
{
dbSleep(50);
dbSetSpriteAlpha(1,i);
dbSync ( );
if (i==2)
{
dbSetSpriteAlpha(1,0);
break;
}