Works!
Thank you very much.
private boolean createBlinkAnimation(int slotIndex) {
if (slotIndex != -1 && slotIndex <= skeleton.getSlots().size) {
Animation.AlphaTimeline alphaTimeline = new Animation.AlphaTimeline(5, 0, slotIndex);
alphaTimeline.setFrame(0, 0, 1f);
alphaTimeline.setFrame(1, 0.5f, 0.3936f);
alphaTimeline.setFrame(2, 0.5f, 0);
alphaTimeline.setFrame(3, 0.5f, 0.3936f);
alphaTimeline.setFrame(4, 0.5f, 1); //Time calculation - Value from spine/30frames
Array<Animation.Timeline> timelinesOutput = new Array<>(1);
timelinesOutput.add(alphaTimeline);
Animation anim = new Animation("blink", timelinesOutput, 1.0333334f);
skeleton.getData().getAnimations().add(anim);
return true;
}
return false;
}
addAnimation(1, "blink", true, 1f);