java - Should I set new TextureRegion for Sprite every frame? -
the animation guide of libgdx in deprecated part, , found no replacement.therefore, intend write convenient animatedsprite
class extends sprite
. thought in every update (game frame), set new textureregion (or x/y coordinate) corresponding image frame.
i wonder why there no animatedsprite class built-in libgdx? solution have problem? there replacement deprecated sprite animation guide?
you can safely set new part sprite every frame, works wonders:
sprite.setregion(animation.getkeyframe(statetime, true));
java animation 2d libgdx
No comments:
Post a Comment