change to check if mouse/touch

This commit is contained in:
Nikola Petrov 2024-03-02 13:49:49 +01:00
parent c01c722fec
commit 7e693bb73f

View File

@ -102,7 +102,7 @@ void generate_tree()
tree[i].numOfBranches = GetRandomValue(1, 3); tree[i].numOfBranches = GetRandomValue(1, 3);
tree[i].lenghthRatio = ((float)GetRandomValue(600,700)) / 1000.0f; tree[i].lenghthRatio = ((float)GetRandomValue(600, 700)) / 1000.0f;
} }
tree[0].color = tree[1].color; tree[0].color = tree[1].color;
@ -136,7 +136,7 @@ int main(void)
while (!WindowShouldClose()) while (!WindowShouldClose())
{ {
if (IsKeyPressed(KEY_R)) if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
{ {
new_tree(); new_tree();
} }