From 289b2dffea3f1d3a219070a408674e738d7da13b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Wed, 9 Mar 2016 20:01:36 +0100 Subject: [PATCH] Construit les objets par leur position (x, y) --- object.hpp | 4 ++-- physics_object.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object.hpp b/object.hpp index 1ac986a..96019a9 100644 --- a/object.hpp +++ b/object.hpp @@ -11,8 +11,8 @@ protected: int charge; public: - Object(sf::Vector2f init_position) : - position(init_position), charge(0) {} + Object(float x, float y) : + position(x, y), charge(0) {} /** * Dessine l'objet dans la fenêtre donnée diff --git a/physics_object.hpp b/physics_object.hpp index 78f10ff..4ec6ae5 100644 --- a/physics_object.hpp +++ b/physics_object.hpp @@ -19,8 +19,8 @@ protected: static constexpr float GRAVITY = 10; public: - PhysicsObject(sf::Vector2f position) : - Object(position), mass(1) {} + PhysicsObject(float x, float y) : + Object(x, y), mass(1) {} /** * Met à jour la physique de l'objet juste avant le dessin d'une frame