문제

I cannot use sequence at all, even THESE gives me an error.

this.AddAction(sequence());
this.AddAction(sequence(setX(getY())));

No matter what I do sequence won't work, despite these being imported. addAction does not work either, nor does addAction & Actions.sequence.. Nothing does as far as this goes.

import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.actions.AddAction;

Edit: I needed to make my class an Actor.

도움이 되었습니까?

해결책

This worked fine for me.

Do this in your constructor of the screen where you want the action:

image.addAction(sequence(fadeOut(3), run(new Runnable() {
        @Override
        public void run() {
            game.setScreen(new MenuScreen(game));
        }
}));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top