summaryrefslogtreecommitdiffstats
path: root/Room.h
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2007-12-14 03:47:03 +0100
committerneoraider <devnull@localhost>2007-12-14 03:47:03 +0100
commita8c1d6168797526b9d24bc8c86f2578f3be59fa8 (patch)
tree8515976a634b788d99b2c894757a0b4ecbb6fa6a /Room.h
parentd82c597917d8ef5866c7a83d0c101f423a2ac05d (diff)
downloadzoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.tar
zoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.zip
zoomedit: Verallgemeinerte Level-Objekte implementiert.
Diffstat (limited to 'Room.h')
-rw-r--r--Room.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Room.h b/Room.h
index cb6ba27..2b05050 100644
--- a/Room.h
+++ b/Room.h
@@ -2,10 +2,11 @@
#define ROOM_H_
#include "Polygon.h"
+#include "LevelObject.h"
#include <string>
-class Room : public Polygon {
+class Room : public Polygon, public LevelObject {
private:
std::string name;
float height;
@@ -14,13 +15,18 @@ class Room : public Polygon {
Room() {height = 10;}
Room(std::string name) {this->name = name; height = 10;}
-
std::string &getName() {return name;}
const std::string &getName() const {return name;}
void setName(const std::string &name) {this->name = name;}
float getHeight() const {return height;}
void setHeight(float height) {this->height = height;}
+
+ virtual bool hit(const Vertex &v) const {return contains(v);}
+
+ virtual const char* getType() const {
+ return "Room";
+ }
};
#endif /*ROOM_H_*/