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

Categories

HOME
porting
design-patterns
ng-idle
zend-framework
obfuscation
babeljs
nfs
modal-dialog
performancepoint
pcl-crypto
openbugs
3nf
linear-algebra
esoteric-languages
searchview
dynamic-sql
job-scheduling
cfml
swagger-2.0
replication
google-maps-autocomplete
aggregation
direct3d11
dynamically-generated
licensing
firebase-analytics
android-things
errbot
eviews
complex-numbers
mockjax
record
jett
android-gridview
android-maps-extensions
openwhisk
reactjs.net
yowsup
processwire
searchkit
google-knowledge-graph
projects-and-solutions
diacritics
spring-mvc-test
visa
wmp
android-checkbox
snapchat
mesosphere
flask-restful
openrasta
user-defined-fields
fclose
facebook-pixel
tf
singleinstance
context-sensitive-grammar
sundials
dt
pdf-conversion
rackspace-cloud
gameplay-kit
cd-burning
observablecollection
http-status-code-401
cfchart
bizagi
realsense
boomerang
decimalformat
video-player
zen-cart
extjs-grid
coda
cgi-bin
rpart
vacuum
haskell-warp
dronekit-android
infosphere-spl
big-ip
trdion2011
named-parameters
dsym
android-usb
hibernate-entitymanager
gd-graph
c++builder-xe5
nebula
facebook-timeline
apache-abdera
bjyauthorize
web-notifications
frameworkelementfactory
nokia-s40
cakephp-1.2
inkcanvas
database-create
fitbounds
automationelement
google-ajax-api
event-receiver
vs-android
binomial-heap
wcf-instancing
localizable.strings
movieplayer

Resources

Encrypt Message