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. --- LevelObject.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LevelObject.h (limited to 'LevelObject.h') diff --git a/LevelObject.h b/LevelObject.h new file mode 100644 index 0000000..6ab93a4 --- /dev/null +++ b/LevelObject.h @@ -0,0 +1,20 @@ +#ifndef LEVELOBJECT_H_ +#define LEVELOBJECT_H_ + +#include "Vertex.h" +#include + + +class LevelObject { + public: + virtual ~LevelObject() {} + + virtual const char* getType() const = 0; + virtual bool hit(const Vertex &v) const = 0; + + bool isOfType(const char *type) const { + return (std::strcmp(getType(), type) == 0); + } +}; + +#endif /*LEVELOBJECT_H_*/ -- cgit v1.2.3