From: Nils Forssén Date: Thu, 9 Nov 2023 14:22:08 +0000 (+0100) Subject: Added object base class X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=995afdf460b12ee06493673da5f8331506acaee1;p=TDDC76_proj.git Added object base class --- 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