- Home /
The logic should go in Update or function called by Update?
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() ?
Answer by Dave-Carlile · Jan 22, 2013 at 10:42 PM
From an optimization standpoint it is irrelevant. From a cleaner/easier to read code perspective, create separate functions.
Your answer
Follow this Question
Related Questions
Lerp or animate? 1 Answer
How to play many animations at once without slowdown? 3 Answers
Profiler clarifications and help 0 Answers
Pitfalls for characer/animations on the iPhone 1 Answer
Animation of terrain causes drastic performance drop (fps) 0 Answers