diff options
author | neoraider <devnull@localhost> | 2007-12-14 03:47:03 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2007-12-14 03:47:03 +0100 |
commit | a8c1d6168797526b9d24bc8c86f2578f3be59fa8 (patch) | |
tree | 8515976a634b788d99b2c894757a0b4ecbb6fa6a /LevelObject.h | |
parent | d82c597917d8ef5866c7a83d0c101f423a2ac05d (diff) | |
download | zoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.tar zoomedit-a8c1d6168797526b9d24bc8c86f2578f3be59fa8.zip |
zoomedit: Verallgemeinerte Level-Objekte implementiert.
Diffstat (limited to 'LevelObject.h')
-rw-r--r-- | LevelObject.h | 20 |
1 files changed, 20 insertions, 0 deletions
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 <cstring> + + +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_*/ |