I have an actor called arrow that I want to repeat a sequence action to it.
This arrow points to an actor which if is clicked the arrow should fade out.
Here is my code:
Action moving = Actions.sequence(
(Actions.moveTo(arrow.getX(), arrow.getY() - 35, 1)),
(Actions.moveTo(arrow.getX(), arrow.getY(), 1)));
arrow.addAction(moving);
actor.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
arrow.addAction(Actions.fadeOut(1));
}
});
Code works fine but I want to repeat 'moving' action untile actor is clicked.
I read about RepeatAction in this question Cannot loop an action. libGDX but I didn't know how I can apply