Affinage des constantes physiques
This commit is contained in:
parent
0b39b49109
commit
f0632db66f
7
ball.hpp
7
ball.hpp
|
@ -15,12 +15,13 @@ protected:
|
|||
*/
|
||||
virtual sf::Vector2f getForces(State state);
|
||||
|
||||
static constexpr float ATTRACTION = 10;
|
||||
static constexpr float MOVE = 10;
|
||||
static constexpr float ATTRACTION = 25000;
|
||||
static constexpr float MOVE = 100;
|
||||
|
||||
public:
|
||||
Ball(float x, float y) : PhysicsObject(x, y), shape(10 * mass) {
|
||||
shape.setFillColor(sf::Color(150,255,20));
|
||||
shape.setOrigin(sf::Vector2f(10 * mass, 10 * mass));
|
||||
shape.setFillColor(sf::Color(255, 245, 131));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -14,6 +14,7 @@ public:
|
|||
static constexpr float GRID = 32;
|
||||
|
||||
Block(float x, float y) : Object(x, y), shape(sf::Vector2f(Block::GRID, Block::GRID)) {
|
||||
shape.setOrigin(sf::Vector2f(Block::GRID / 2, Block::GRID / 2));
|
||||
shape.setFillColor(sf::Color(0, 0, 0));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ protected:
|
|||
*/
|
||||
virtual sf::Vector2f getForces(State state);
|
||||
|
||||
static constexpr float GRAVITY = 10;
|
||||
static constexpr float GRAVITY = 275;
|
||||
|
||||
public:
|
||||
PhysicsObject(float x, float y) :
|
||||
|
|
Loading…
Reference in New Issue