android - I want to repeat the animation on touch/click on screen in Libgdx -
i adding animation game, added images in array[] of textureregion , added key frames , duration animation().
i have set play-mode normal.
but when doing this:
if(gdx.input.istouched()) { batch.begin(); readytext_elapsedtime += gdx.graphics.getdeltatime(); batch.draw(anim.getkeyframe(readytext_elapsedtime, false), 5, 20); batch.end(); }
the result getting animation, if click fast, of frames preloaded , animation gets completed earlier. might solution this?
and cant comment yet, ask here make question bit clearer.
for animation can set speed - when create new animation: new animation(float frameduration, textureregion... keyframes)
, change frameduration adjust speed.
also can advise use texturepacker textureatlas animation keyframes, not add hand array. check out answer on this question
Comments
Post a Comment