private RepeatAction getActionSequenceForButtons(float delay) { RepeatAction ra = new RepeatAction(); SequenceAction sa = new SequenceAction(); sa.addAction(Actions.delay(delay)); sa.addAction(Actions.sizeBy(5, 5, .75f)); sa.addAction(Actions.sizeBy(-5, -5, .75f)); ra.setAction(sa); ra.setCount(RepeatAction.FOREVER); return ra; }
private void mainInit() { Image logo; logo = new Image(new Texture("resources/logo.png")); logo.setPosition(16, 300); logo.setOrigin(logo.getWidth() / 2, logo.getHeight() / 2); RepeatAction twinkleForever = new RepeatAction(); twinkleForever.setAction(new SequenceAction(CustomActions.twinkle(), new DelayAction(1.3f))); twinkleForever.setCount(RepeatAction.FOREVER); logo.addAction(twinkleForever); music = Gdx.audio.newMusic(Gdx.files.internal("resources/music/main.mp3")); music.play(); stage.addActor(logo); }
@Override public void restart() { isCurrentLoopInitialized = false; executedCount = 0; super.restart(); }