- Home /
How to handle animations properly?
Hey everyone. So I have a question regarding how to properly design animation systems. What I currently have is I create an [UnitName]Animations class for every unit that has animations and it contains public methods for every animation state that I want to transition to. For example, I have a Player game object and it has PlayerAnimations class. And I would call those methods from other game logic classes like Movement.
So my 3 main concerns with this are:
It has a very tight coupling between Animations and any other class I use it in.
It does not separate game logic code from animation transitions code and I have this multiple responsibility soup.
I have to create a new method for every animation I make and it gets tedious in large projects.
Do you have any suggestions? How would you solve this problem? Or maybe it's not a problem and I'm overthinking?
Thank you in advance!