fix bunnymark boundies
This commit is contained in:
parent
4ac87b3021
commit
b566cf20b5
@ -81,10 +81,10 @@ void game_tick(void)
|
||||
state->bunnies[i].position.x += state->bunnies[i].speed.x;
|
||||
state->bunnies[i].position.y += state->bunnies[i].speed.y;
|
||||
|
||||
if (((state->bunnies[i].position.x + BUNNY_W / 2) > ctx.window_w) ||
|
||||
if (((state->bunnies[i].position.x + BUNNY_W / 2) > ctx.base_draw_w) ||
|
||||
((state->bunnies[i].position.x + BUNNY_W / 2) < 0))
|
||||
state->bunnies[i].speed.x *= -1;
|
||||
if (((state->bunnies[i].position.y + BUNNY_H / 2) > ctx.window_h) ||
|
||||
if (((state->bunnies[i].position.y + BUNNY_H / 2) > ctx.base_draw_h) ||
|
||||
((state->bunnies[i].position.y + BUNNY_H / 2 - 60) < 0))
|
||||
state->bunnies[i].speed.y *= -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user