android
setTextureRegion AnimatedSprite
I'm developping a game which implements gif sprites... After start with gif I used png image and for change the TextureRegion of my sprite I followed this guide: Sprite.setImage() in andengine and it worked very well. Now I want to do the same thing with AnimatedSprite. Can someone tell me How i can edit the org.anddev.andengine.entity.sprite.AnimatedSprite.java to create: sprite.setAnimatedTextureRegion(PixelPerfectTiledTextureRegion textureRegion) P.S I use also PixelPerfect
The AnimatedSprite class uses the same texture region declared in BaseSprite, so the code in the link you gave will work - just paste it in the AnimatedSprite.java file: public void setTiledTextureRegion(TiledTextureRegion textureRegion) { this.mTextureRegion = textureRegion; } Note: If the different tiled textures have different number of tiles (So each has a different animation parameters associated with it) you should handle it in your code. It may get complicated, so I'd just create a new AnimatedSprite instead of replacing the texture region.
Related Links
Combo box to select city for time zone
libgdx sharedPreferences
Upload a image in flickr shows error
Listview still clickable even though is replaced by clicked fragment
How can i put pending intents in SQlite databse?
Support ActionBar and GameBaseActivity
Cordova File Transfer Crashes app
VideoView with Gesture(Swipe function) in android
screen orientation in Android Fragments
Adding third party dll in xamarin studio
adb pull dynamically created file path
how to parse json data recieved as a string
Move two VIewPagers simulataneously in one gesture
unexpected huawei installation
Scanning and Editing Android App Memory Values Programmatically
Display images stored on sd card on gridview