Added object base class
authorNils Forssén <nilfo359@student.liu.se>
Thu, 9 Nov 2023 14:22:08 +0000 (15:22 +0100)
committerNils Forssén <nilfo359@student.liu.se>
Thu, 9 Nov 2023 14:22:08 +0000 (15:22 +0100)
src/Object.h

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6b4e7cd053057ac3094ede9657b309e02ec19ba9 100644 (file)
@@ -0,0 +1,18 @@
+#include <SFML/Graphics.hpp>
+#include <vector>
+
+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