blob: 50f470e46bb9118d503985d4849c0b0019c82dbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef LEVELOBJECT_H_
#define LEVELOBJECT_H_
#include "Object.h"
#include "Vertex.h"
#include <list>
class LevelObject : public Object {
private:
LevelObject *parent;
public:
LevelObject(LevelObject *p = NULL) : parent(p) {}
virtual ~LevelObject() {}
LevelObject* getParent() const {
return parent;
}
virtual std::vector<SharedPtr<LevelObject> > getChildren() {
return std::vector<SharedPtr<LevelObject> >();
}
virtual bool hit(const Vertex &v) const {return false;}
virtual bool hit(const Vertex &v, float scale) const {return hit(v);};
virtual int getPriority() const {return 0;}
virtual bool canMove() const {return false;}
virtual void move(float x, float y) {}
virtual bool canRotate() const {return false;}
virtual void rotate(Vertex m, float a) {}
};
#endif /*LEVELOBJECT_H_*/
|