| 1 | #include "ball.hh" |
| 2 | |
| 3 | void Ball::resetBall(Render &r, Player &p) { |
| 4 | p.player.x = (r.width / 2) - (p.player.w / 2); |
| 5 | Ball::ball.y = p.player.y - (p.player.h * 4); |
| 6 | Ball::yvelocity = Ball::ballspeed / 2; |
| 7 | Ball::xvelocity = 0; |
| 8 | Ball::ball.x = r.width / 2 - (Ball::size / 2); |
| 9 | } |