This is more a matter of optimization.I’m working on the animation manager for a character and I was wondering if I should put all the logic in the Update() function or make another function that should be called from Update() given the fact that I want to separate the code that handles the usual animations (run,walk, jump) from the code that handles the attack animations.And I want to do that because the animations for run , walk or jump will be triggered by the value of some booleans from the movement controller - isRunning, isJumping, isWalking , but the attack animations will not. That way I keep the things clean and separated. So how is better?Dump all in Update() or different function called from Update() ?
1 Answer
1From an optimization standpoint it is irrelevant. From a cleaner/easier to read code perspective, create separate functions.
Thank you for your answer.
– drak0