skizzle/ball.hpp

34 lines
636 B
C++
Raw Normal View History

2016-03-08 22:28:50 +00:00
#ifndef __PTF_BALL_HPP__
#define __PTF_BALL_HPP__
2016-03-04 15:29:31 +00:00
#include <SFML/Graphics.hpp>
#include <iostream>
#include "state.hpp"
#include "physics_object.hpp"
2016-03-04 15:29:31 +00:00
class Ball : public PhysicsObject {
2016-03-04 15:29:31 +00:00
protected:
/**
* Calcule les forces appliquées à l'objet
*/
2016-03-09 18:42:09 +00:00
sf::Vector2f getForces(State state);
2016-03-04 15:29:31 +00:00
2016-03-08 20:15:08 +00:00
static constexpr float ATTRACTION = 10;
static constexpr float MOVE = 10;
2016-03-04 15:29:31 +00:00
public:
/**
* Dessine la balle dans la fenêtre donnée
*/
void draw(sf::RenderWindow& window);
2016-03-04 15:29:31 +00:00
/**
* Détermine la couche d'affichage de l'objet
*/
unsigned int getLayer() {
return 1;
}
2016-03-04 15:29:31 +00:00
};
#endif