我创建了一个AnimatedSprite类,它绘制了一个特定的TextureRegion. 有时我需要一个 tint 颜色效果,所以我设置(this.color 是Colormy 的一个字段AnimatedSprite):
super.draw(batch, parentAlpha);
batch.setColor(this.color);
batch.draw(this.frames[this.currentFrame], x, y, originX, originY, width, height, scaleX, scaleY, rotation)
batch.setColor(Color.WHITE);
但是,当我将AnimatedSprite的颜色设置为黑色或任何颜色时,其他所有颜色都具有该颜色。我什至尝试flush(),结束批次并开始一个新的,等等......但似乎没有任何效果。
请帮我正确应用色调效果。我会很感激任何想法。