Set ball reset position to middle of window
This commit is contained in:
parent
145fbfd02e
commit
0d522fb521
@ -16,8 +16,8 @@ Ball_init(int screen_width, int screen_height)
|
||||
|
||||
void
|
||||
Ball_reset(Ball *b, int direction) {
|
||||
b->posX = 100;
|
||||
b->posY = 100;
|
||||
b->posX = b->SCREEN_WIDTH/2;
|
||||
b->posY = b->SCREEN_HEIGHT/2;
|
||||
b->velX = direction * 7;
|
||||
b->velY = 5;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user