我通过纹理加载图像
texture = new Texture("badlogic.jpg");
texture2 = new Texture("badlogic2.png");
image=new Image(texture);
stage.addActor(image);
或TextureRegion
texture = new Texture("badlogic.jpg");
regions=new TextureRegion[2];
regions[0]=new TextureRegion(texture, 0, 0, 64, 64);
regions[1]=new TextureRegion(texture, 0, 63, 64, 64);
image=new Image(regions[0]);
stage.addActor(image);
现在,我想将image
更改为texture2
或regions[1]
。我怎么能这样做?