From 995afdf460b12ee06493673da5f8331506acaee1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nils=20Forss=C3=A9n?= Date: Thu, 9 Nov 2023 15:22:08 +0100 Subject: [PATCH] Added object base class --- src/Object.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Object.h b/src/Object.h index e69de29..6b4e7cd 100644 --- a/src/Object.h +++ b/src/Object.h @@ -0,0 +1,18 @@ +#include +#include + +class Object +{ +public: + virtual bool collides(Object& other) = 0; + virtual void collision(Object& other) = 0; + virtual void update() = 0; + virtual void render(sf::RenderWindow& window) = 0; + + virtual ~A() = default; +private: +protected: + double x_pos; + double y_pos; + sf::Sprite sprite; +}; \ No newline at end of file -- 2.30.2