我需要知道如何将动画的内容移动到另一个动画中。
animation1 = new Animation;
animation2 = new Animation;
index = 0;
tempFrames = TextureRegion.split(xxx, xxx.getWidth() / 4, xxx.getHeight() / 2);
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 2; j++) {
tempAnimationFrames[index] = tempFrames[j][i];
index++;
}
}
animation = new Animation<TextureRegion>(1f / 8f, tempAnimationFrames);
如何在animation2中移动动画animation1?
这比你想象的要容易......我遇到了同样的问题,你已经声明了 animation2 所以你只需要写:
animation2 = animation1;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句