Hello, how can I get from this spite:
etc. this:
Thank you!
If you are using the Libgdx Sprite class, you can use the sprite.setColor method, just make sure you’re rendering your sprite with the sprite.draw method.
Could you suggest what parameters must be specified in the method .setColor()?
If i using
Color tint = new Color(1f, .7f, .7f, 1f);
sprite.setColor(tint);
I got that:
My code:
//Loading texture
TextureRegion[][] worm;
worm = split("res/entities/worm.png", 14, 32);
//Select frmae in tick() method
sprite = new Sprite(Art.worm[frame][0]);
//Needs magic here
//Tuning sprite
sprite.setOrigin(7, 16);
sprite.setPosition(x, y);
sprite.setRotation(angle + 90f);
//Rendering in render method
sprite.draw(screen.spriteBatch);
Your grayscale sprite is too dark.