1 decade ago by Eddie
I tried looking for an answer to this question around the forums and couldn't find one, so here goes:
The Entity class is designed so that your
However, since
Thanks fellow Impact users.
The Entity class is designed so that your
init: function
contains the addAnim
functions in it. These addAnim
functions ask you to specify a "Frame Time" as the second parameter, which is how long a specific sprite is in place throughout the run-through of the animation. However, in order to make a sprite with a good running animation, the "Frame Time" has to change according to the Entity's speed (i.e. when your first starting to run the sequence of sprites is slow and starts speeding up to simulate running faster and faster).However, since
addAnim
is in the init: function
, it doesn&039;t get updated. Should I move the #addAnim
to the update function and add a variable to the FrameTime? I feel like this would break my game. If this isn't the solution, what is?Thanks fellow Impact users.