Hello everyone!
I have a quick question for you guys. I think I looked everywhere, but I couldn't find an answer. I'm still working on my fighting game project and I was wondering how it would be possible to detect, during an animation, on which specific frame of a state the sprite currently is.
Example: my fighter sprite has 2 states, one being normalState and the other one is attackingState. When the player hits the attack button, the state changes from normalState to attackingState. Now, this state is composed of 4 frames. The thing is, how am I supposed to detect when the attack animation has ended (on the 4th frame) to switch the state back from attackingState to normalState?
Or am I confused and not taking the most logic approach?
Thanks for your help!