From a8c1d6168797526b9d24bc8c86f2578f3be59fa8 Mon Sep 17 00:00:00 2001 From: neoraider Date: Fri, 14 Dec 2007 02:47:03 +0000 Subject: zoomedit: Verallgemeinerte Level-Objekte implementiert. --- Room.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Room.h') 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 -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_*/ -- cgit v1.2.3