|
| | Ball (int x, int y, int radius, const SDL_Color &color, const std::string &id) |
| | Constructs a new Ball object.
|
| |
| void | render (std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2) override |
| | Renders the ball on the screen.
|
| |
| void | move () override |
| | Moves the ball according to its velocity.
|
| |
| void | setVelocity (float dx, float dy) |
| | Sets the velocity of the ball.
|
| |
| void | handleCollisions (point collision) override |
| | Handles collisions with other objects.
|
| |
| void | handleCollision (point vect) |
| | Handles collision with a single object.
|
| |
| | MovingObject (int x, int y, int radius, const std::string &id) |
| | Constructs a new MovingObject with a circular collider.
|
| |
| | MovingObject (int x, int y, int width, int height, const std::string &id) |
| | Constructs a new MovingObject with a rectangular collider.
|
| |
| virtual void | move ()=0 |
| | Moves the object.
|
| |
| | CollidingObject (int x, int y, int radius, const std::string &id) |
| | Constructs a new CollidingObject with a circular collider.
|
| |
| | CollidingObject (int x, int y, int width, int height, const std::string &id) |
| | Constructs a new CollidingObject with a rectangular collider.
|
| |
| | CollidingObject (int x, int y, int width, int height, bool isTop, const std::string &id) |
| | Constructs a new CollidingObject with a triangular collider.
|
| |
| | CollidingObject (int x, int y, int width, int height, int edges, const std::string &id) |
| | Constructs a new CollidingObject with a hexagonal collider.
|
| |
| std::shared_ptr< Collider > | getCollider () |
| | Gets the collider associated with the object.
|
| |
| virtual void | handleCollisions (point collision)=0 |
| | Handles collisions with other objects.
|
| |
| virtual void | render (std::shared_ptr< SDL_Renderer > renderer, SDL_Color color1, SDL_Color color2)=0 |
| | Renders the object on the screen.
|
| |
The Ball class represents a ball object in the game.
The Ball class inherits from the MovingObject class and represents a ball that moves within the game environment.
Definition at line 20 of file Ball.h.