Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Paddle* Gunngine::getPaddle()
- {
- if (_collision.CheckCollision(_topPaddle->_paddleRect, _ball->_ballRect))
- {
- return _topPaddle;
- }
- if (_collision.CheckCollision(_bottomPaddle->_paddleRect, _ball->_ballRect))
- {
- return _bottomPaddle;
- }
- if (_collision.CheckCollision(_leftPaddle->_paddleRect, _ball->_ballRect))
- {
- return _leftPaddle;
- }
- if (_collision.CheckCollision(_rightPaddle->_paddleRect, _ball->_ballRect))
- {
- return _rightPaddle;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement