i use a stage on my background but the fadein doens't work. This is my code:
public class Level1 implements Screen{
//Background stage
Texture BackgroundLevel1;
private Stage BackgroundL1;
NameGame game;
public Level1 (NameGame game){
this.game = game;
BackgroundL1 = new Stage();
BackgroundLevel1 = new Texture("BackgroundLevel1.png");
Image background = new Image(BackgroundLevel1);
BackgroundL1.addActor(background);
}
@Override
public void show() {
}
@Override
public void render(float f) {
Gdx.gl.glClearColor(0, 0, 0, 0);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
game.batch.begin();
BackgroundL1.addAction(Actions.fadeIn(1));
game.batch.draw(BackgroundLevel1, 0, 0, NameGame.WIDTH, NameGame.HEIGHT);
game.batch.end();
}