Fix starts to no be transperent

This commit is contained in:
Nikola Petrov 2024-03-09 22:47:57 +01:00
parent 2d67f41ab1
commit bb74873557

View File

@ -30,10 +30,12 @@ void BackGround::starts()
{
int x = GetRandomValue(0, size);
int y = GetRandomValue(0, size);
int alph = GetRandomValue(10, 100);
int weight = GetRandomValue(1, 3);
rlColor4ub(starColor.r, starColor.g, starColor.b, alph);
float alph = ((float)GetRandomValue(10, 200)) / 255.0f;
Color color = ColorLerp(backGroundColor, starColor, alph);
rlColor4ub(color.r, color.g, color.b, color.a);
// topLeft
rlTexCoord2f(0, 0);
@ -56,7 +58,7 @@ void BackGround::starts()
void BackGround::moon()
{
int xpos = GetRandomValue(100, size - 100);
int ypos = GetRandomValue(100, 300);
int ypos = GetRandomValue(100, maxYPosOfMoon);
int r = GetRandomValue(minSizeOfMoon, maxSizeOfMoon);
DrawCircle(xpos, ypos, r + 20, ColorLerp(backGroundColor, moonColor, 0.02f));