Android Question [Resolved]Libgdx Sprite Transparency

walterf25

Expert
Licensed User
Longtime User
I think you might be able to change the alpha parameter, haven't tried it but it should work.

Cheers,
Walter
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User
1) I suggested to change the alpha value of Smiley.Color, not the one of Batch.Color. It's easy to do in the demo because you just have to change the last parameter of Smiley.Color.SetRGBA (line #118).
2) The Alpha function is not documented and you've been fooled by the function name. In fact, it converts a float value between 0 and 1 to an int value between 0 and 255. Use setRGBA, as in the demo, to change the alpha value.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…