如何使用十六进制颜色值更改精灵的颜色

时间:2015-03-16 09:26:52

标签: java libgdx

我正在尝试使用十六进制颜色代码设置精灵的颜色 但它不起作用......

Sprite bricks;
bricks = new Sprite(new Texture("strip.png"));
bricks.getTexture().setFilter(TextureFilter.Linear, TextureFilter.Linear);
batch.begin();
bricks.draw(batch);
batch.end();

在另一个功能

bricks.setColor(36/255f, 48/255f, 209/255f, 0.7f);//set color hex code

但精灵颜色没有改变

0 个答案:

没有答案
相关问题