Hi all ,
I m new to b4a but im very excited about this great develepment enviroment.
So i started experimanting with Libgdx and i m creating a multiplayer game but i want the other players to
be transparent and i cant find an way to do that with sprite batch .
So any ideas are Wellcome thanks Alot !!
Hi all ,
I m new to b4a but im very excited about this great develepment enviroment.
So i started experimanting with Libgdx and i m creating a multiplayer game but i want the other players to
be transparent and i cant find an way to do that with sprite batch .
So any ideas are Wellcome thanks Alot !!
Walter is right. In the perf_smiley demo, you can see the line: Batch.Color = Smiley.Color. If you change the alpha value of Smiley.Color, you change the transparency.
hmmm i cant seem to set the alpha proprty correctly ,
so lets say i want to set to 50 % transprence
i tryed Batch.Color.alpha(0.5) before my
Batch.DrawRegion3
but nothing happend ...
I know its a little silly question but , as i said im a beginer in b4a
hmmm i cant seem to set the alpha proprty correctly ,
so lets say i want to set to 50 % transprence
i tryed Batch.Color.alpha(0.5) before my
Batch.DrawRegion3
but nothing happend ...
I know its a little silly question but , as i said im a beginer in b4a
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.