projects
/
TDDC76_proj.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1db565e
)
Added object base class
author
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 14:22:08 +0000
(15:22 +0100)
committer
Nils Forssén
<nilfo359@student.liu.se>
Thu, 9 Nov 2023 14:22:08 +0000
(15:22 +0100)
src/Object.h
patch
|
blob
|
history
diff --git
a/src/Object.h
b/src/Object.h
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6b4e7cd053057ac3094ede9657b309e02ec19ba9 100644
(file)
--- a/
src/Object.h
+++ b/
src/Object.h
@@
-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