changed Color struct to 4 floats
GetRandomValue returns floats added GetRandomInt added Color4ub rgba 0-255 edited examples to work colour palette values could bare a double check!
This commit is contained in:
parent
ea70c47a1a
commit
b4d8f0b5d1
1 changed files with 475 additions and 359 deletions
|
|
@ -39,10 +39,10 @@ int main(void)
|
|||
for (int i = 0; i < MAX_PARTICLES; i++)
|
||||
{
|
||||
mouseTail[i].position = (Vector2){ 0, 0 };
|
||||
mouseTail[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 };
|
||||
mouseTail[i].color = (Color){ GetRandomValue(0, 1), GetRandomValue(0, 1), GetRandomValue(0, 1), 1 };
|
||||
mouseTail[i].alpha = 1.0f;
|
||||
mouseTail[i].size = (float)GetRandomValue(1, 30)/20.0f;
|
||||
mouseTail[i].rotation = (float)GetRandomValue(0, 360);
|
||||
mouseTail[i].size = (float)GetRandomInt(1, 30)/20.0f;
|
||||
mouseTail[i].rotation = (float)GetRandomInt(0, 360);
|
||||
mouseTail[i].active = false;
|
||||
}
|
||||
|
||||
|
|
@ -132,4 +132,4 @@ int main(void)
|
|||
//--------------------------------------------------------------------------------------
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue