I'm having a problems controlling the keyframes of one animation of my game…
When the player hits the key "A", the character must punch it's enemy, the problem is that: if the player hits the key too quickly, the full animation of the punch is not displayed. The whole animation is viwed only when the player keeps pressing the key "A" and do not releases it until the last keyframe…
I'm sending the code related to that part of the game and some images to make it easier for you guys to understand.
You are going to have to monitor this yourself. The KeyframeController is just doing what you are telling it to do (setting the animation times). So, what I would do is enhance your ifBattle test a little bit more, before switching it back to false, make sure the animation time is appropriate for the finished animation.
The idea that has crossed my mind right now is to add a variable inside the update method that will receive the keyframe value of the moment the player presses "A", and will be increased on every step, until the variable's value is equal to the animation's final keyframe value…