I am using libGDX for a 2d game. Some of my in-game objects have animations, for example a soldier in top-down view that has a walking animation. That is working fine.
Now, while walking, this soldier could do other things as well, for example firing his gun. So both, walking and firing, can happen at the same time.
My question now is: How does one usually deal with these multiple simultaneous animations for the same object? Do I need different animations (one for just walking, one for just shooting, and one animation for both at the same time), or do I rather split the object into several sprites (eg. the soldier's body separated from his arm with the gun), to animate these parts separately? Or is there even another way to achive this?