123456789101112131415161718192021 |
- #include <SFML/Graphics.hpp>
- #include <SFML/Audio.hpp>
-
- class Ball : public sf::CircleShape {
- private:
- float x,
- y,
- radius = 10;
- const float ballSpeed = 400;
-
- public:
- Ball();
- Ball(int radius);
- void move(float x, float y);
- void setPosition(float x, float y);
- float getX() const;
- float getY() const;
- float getSpeed() const;
- void render(sf::RenderWindow) const;
-
- };
|