#stuck on how to implement hand animations for fps arms
1 messages · Page 1 of 1 (latest)
That's definitely one way to do it and the logic seems good to me
Another way would be to apply what's called the "strategy pattern"
In the strategy pattern, your character doesn't have to know or care about anything specific to the gun they are using. The character just calls a "shoot" function and the gun itself takes care of handling any specific logic related to it (like firing one bullet or 3 spread bullets, or even calling specific animations to happen)
Up to you really
You could also just have a property in your gun class that hold the value for what animation the character should play
Lots of different ways you could approach this