|
casse-brick latest
Ce projet est réalisé dans le cadre du cours de Programmation Avancée en M1 Informatique de l'université de Strasbourg.
|
The MovingObject class represents a moving colliding object. More...
#include <CollidingObject.h>
Public Member Functions | |
| 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. | |
Public Member Functions inherited from CollidingObject | |
| 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. | |
Data Fields | |
| point | Velocity |
| The velocity of the object. | |
Additional Inherited Members | |
Protected Attributes inherited from CollidingObject | |
| std::shared_ptr< Collider > | collider |
| The collider associated with the object. | |
The MovingObject class represents a moving colliding object.
The MovingObject class inherits from the CollidingObject class and provides functionality for moving objects in a game environment.
Definition at line 486 of file CollidingObject.h.
|
inline |
Constructs a new MovingObject with a circular collider.
| x | The x-coordinate of the object's position. |
| y | The y-coordinate of the object's position. |
| radius | The radius of the circular collider. |
| id | The unique identifier of the object. |
Definition at line 498 of file CollidingObject.h.
|
inline |
Constructs a new MovingObject with a rectangular collider.
| x | The x-coordinate of the object's position. |
| y | The y-coordinate of the object's position. |
| width | The width of the rectangular collider. |
| height | The height of the rectangular collider. |
| id | The unique identifier of the object. |
Definition at line 512 of file CollidingObject.h.
|
pure virtual |
| point MovingObject::Velocity |
The velocity of the object.
Definition at line 488 of file CollidingObject.h.