0

我正在将 libgdx 和 scene2d 用于 android 游戏。我有一个带有演员的舞台,可以点击它来执行各种任务。演员目前是静态图像。我还有其他针对覆盖的代码

    targetRingSmall = new Animation(1 / 6f, targetAtlas.findRegions("small"));
    targetRingSmall.setPlayMode(Animation.LOOP_PINGPONG);
    targetRingSmall.getKeyFrame(0);

animationTime += delta;
batch.draw(targetRingSmall.getKeyFrame(animationTime), x, y, 76, 76);

我想将演员更改为循环动画图像,同时将它们保持为可点击的演员。我怎样才能做到这一点?

4

1 回答 1

1

在带有动画关键帧图像的演员上使用 setDrawable 可以满足我的需要。

于 2014-04-09T04:40:59.793 回答