libgdx change Image Sprite on runtime -


creating image actor works if sprite passed in image constructor

sprite sprite ...  image image = new image(sprite); 

i need change sprite on runtime. not work:

image.setdrawable(new textureregiondrawable(newsprite)); 

any idea how fire change?

i believe want use textureregion , decide frame draw: https://github.com/libgdx/libgdx/wiki/2d-animation


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -