[英]libGDX: How to disable the color on SpriteBatch?
With some assets, I'm trying to implement is so that I have a grayscale image, and use the Batch#setColor
method to paint over it programmatically.对于一些资产,我试图实现的是我有一个灰度图像,并使用Batch#setColor
方法以编程方式对其进行绘制。
However, can Batch#setColor
be disabled afterwards for rendering of the rest of the assets?但是,之后是否可以禁用Batch#setColor
以渲染其余资产? I only want certain assets to render with the colored overlaid, not everything else as well.我只希望某些资产以彩色叠加呈现,而不是其他所有资产。
I'm failing to see how to disable it, but I assume there must be a way?我看不到如何禁用它,但我认为一定有办法吗?
批次的设置颜色乘以精灵的颜色,因此要“禁用”它,请将其设置为白色。
batch.setColor(Color.WHITE);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.