From 43394c8a8908442982e3a7e25975c31b3c952923 Mon Sep 17 00:00:00 2001 From: Nikolas Date: Sun, 27 Oct 2024 12:52:55 +0200 Subject: root --- src/gameobject.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/gameobject.h (limited to 'src/gameobject.h') diff --git a/src/gameobject.h b/src/gameobject.h new file mode 100644 index 0000000..fe317df --- /dev/null +++ b/src/gameobject.h @@ -0,0 +1,36 @@ +#pragma once + +#include + +using namespace std; + +class GameObject { + + float pos_x, pos_y, size_x, size_y, orientation; + bool terminate; + string texture; + +public: + + GameObject(float pos_x, float pos_y, float size_x, float size_y, float orientation, string texture); + virtual ~GameObject(); + + virtual void update(); + virtual void draw(); + + float getPosX(); + float getPosY(); + float getSizeX(); + float getSizeY(); + float getOrientation(); + float getRadius(); + bool getTerminate(); + string getTexture(); + + void setPosX(float pos_x); + void setPosY(float pos_y); + void setTerminate(bool terminate); + + virtual bool collidable(); + +}; \ No newline at end of file -- cgit v1.2.3