简体   繁体   中英

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.

However, can Batch#setColor be disabled afterwards for rendering of the rest of the assets? 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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM