SFML Pong, but object oriented

Paddle.h 452B

1234567891011121314151617181920
  1. #include <SFML/Graphics.hpp>
  2. #include <SFML/Audio.hpp>
  3. class Paddle : public sf::RectangleShape {
  4. private:
  5. float x,
  6. y;
  7. sf::Vector2f size;
  8. public:
  9. Paddle();
  10. void move(float x, float y);
  11. void draw(sf::RenderWindow);
  12. float getX() const;
  13. float getY() const;
  14. sf::Vector2f getSize() const;
  15. void setPosition(float x, float y);
  16. void render(sf::RenderWindow) const;
  17. };