Disappear text in libgdx

0

Hello everyone I am with android studio and I am trying to make a text appear and disappear .. for now I have this:

Container container1 = new Container(textLbl2);
        container1.setTransform(true);
        container1.center();
        container1.setPosition(Settings.GAME_WIDTH /2, Settings.GAME_HEIGHT /1 -textLbl2.getHeight()/1);

I think the option would be for example with ActionColor?

For example I have this other option :( That makes bigger or smaller ..) I need something similar but with appear and disappear but I do not get it ..: (

    container1.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(Actions.scaleTo(0.2f, 0.2f, 0.2f),Actions.scaleTo(0.2f,0.2f,0.2f))));
            stage.addActor(container1);

¡
    
asked by Montse Mkd 06.12.2017 в 20:49
source

1 answer

0

This is a possible solution:

Color color = Color.BLACK;
        Color color1 = Color.CLEAR;
        container1.addAction(Actions.repeat(RepeatAction.FOREVER, Actions.sequence(Actions.color(color, 1), Actions.color(color1,1))));
            stage.addActor(container1);

I do not know if it's the most correct, but I get what I need.

    
answered by 06.12.2017 в 21:25