Hello together,
I've been using the Libgdx Java Runtime to implement a turn based game. And on every turn I want animate the match result as an AnimationState. So far so good, but I have two animated game objects and I must wait until all animations are finished.
take turn
calculate match result
animate match result
wait until animations finished
take turn and so on...
For every sequence of animation, I've created a AnimationState:
AnimationState stateWin = new AnimationState(stateData);
stateWin.setAnimation("fight", false, 0);
stateWin.addAnimation("win", false, 0);
stateWin.addAnimation("happy", false, 0);
AnimationState stateLose = new AnimationState(stateData);
stateLose.setAnimation("fight", false, 0);
stateLose.addAnimation("lose", false, 0);
1) What is the a best practice to animate such a turn?
2) How can wait until both animation states are finished? (Compare end time? TrackEntry.isComplete? AnimationStateListener?)
Thank you for your help..
Greets
Philipp