I have a problem.
There is a character with many different animations (running in different directions, standing, jumping, aiming, shooting, etc). In most cases there is condition that when no key is pressed, we set standing animation. Also there are many private variables which control separate parts of animation (e.g. when we press Space - jumping animation is playing, and sprite's 8-direction movement is changed to Bullet movement).
Problem is that I can't set every animation separately, because variables, keys and their inversion, overlap and interfere with each other...
Suggest please right scheme, where sprite with many animations works properly and variables don't interfere with each other.