Hey There.
I Want to make an object invisible with time limit. And then when the invisible time limit is over, that's object will be visible.
Visible is also with time limit.
But when i tried this code, my object is visible for a few seconds and then become invisible for ever.
public void gerak()
{
move(direction);
if (isAtEdge())
{
direction = -direction;
}
if (visible>0)
{
World world;
world = getWorld();
getImage().setTransparency(255);
visible--;
if(visible == 0)
{
invisible = 100;
getImage().setTransparency(0);
invisible--;
if(invisible == 0)
{
getImage().setTransparency(255);
visible = 100;
}
}
}
}
