I know how I can create animation with TextureRegions and apply to an object in non-box2d game.
But in box2d of libgdx, I am not sure how to. In CocosD2, there is runaction method in Sprite object. But there isn’t in libgdx. I would appreciate any hint or clue.
Don’t mix up things. Box2D is a physics engine while you are talking about animations which are absolutely unrelated to physics.
Both Cocos2D and libgdx use Box2D to manage physics but the way they manage animations is independent from that.
I’m practical of Cocos2D but never used libgdx, according to Javadoc (found here) you have a class
Actorthat is described asI guess this is what you are looking for. It will draw itself from a texture atlas and you will be able to dinamically modify its attributes (check package
com.badlogic.gdx.scenes.scene2d.actions). Not that hard to find if you search for it.