diff options
Diffstat (limited to 'LevelObject.h')
-rw-r--r-- | LevelObject.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/LevelObject.h b/LevelObject.h index 4cb56a4..005b3a9 100644 --- a/LevelObject.h +++ b/LevelObject.h @@ -3,14 +3,28 @@ #include "Object.h" #include "Vertex.h" +#include <list> class LevelObject : public Object { + private: + LevelObject *parent; + public: + LevelObject() : parent(NULL) {} + LevelObject(LevelObject *p) : parent(p) {} virtual ~LevelObject() {} - virtual bool hit(const Vertex &v) const = 0; - virtual int getPriority() const = 0; + LevelObject* getParent() const { + return parent; + } + + virtual std::vector<SharedPtr<LevelObject> > getChildren() { + return std::vector<SharedPtr<LevelObject> >(); + } + + virtual bool hit(const Vertex &v, float scale) const = 0; + virtual int getPriority() const {return 0;} virtual void move(float x, float y) {} virtual void rotate(float a) {} |