Déclaration virtuelle pour l'héritage dynamique
This commit is contained in:
parent
ea10f375e9
commit
4610662dd8
2
ball.hpp
2
ball.hpp
|
@ -13,7 +13,7 @@ protected:
|
|||
/**
|
||||
* Calcule les forces appliquées à l'objet
|
||||
*/
|
||||
sf::Vector2f getForces(State state);
|
||||
virtual sf::Vector2f getForces(State state);
|
||||
|
||||
static constexpr float ATTRACTION = 10;
|
||||
static constexpr float MOVE = 10;
|
||||
|
|
|
@ -14,7 +14,7 @@ protected:
|
|||
/**
|
||||
* Calcule les forces appliquées à l'objet
|
||||
*/
|
||||
sf::Vector2f getForces(State state);
|
||||
virtual sf::Vector2f getForces(State state);
|
||||
|
||||
static constexpr float GRAVITY = 10;
|
||||
|
||||
|
|
Loading…
Reference in New Issue