X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FTrigger.h;h=eb174607d00e76a04c4cd8b68201f3da1ff097c9;hb=2ccc2369d32fb680a3047519d79c17de34c4e10a;hp=f1e9cb0089c189f7eb14d921c1a13947cdc1e2a4;hpb=65f855e8181613291670bf1ef84623fabc4594d9;p=l2e.git diff --git a/src/map/Trigger.h b/src/map/Trigger.h index f1e9cb0..eb17460 100644 --- a/src/map/Trigger.h +++ b/src/map/Trigger.h @@ -8,6 +8,9 @@ #ifndef MAP_TRIGGER_H_ #define MAP_TRIGGER_H_ +#include "Entity.h" +#include "fwd.h" +#include "../common/Script.h" #include "../geometry/Vector.h" namespace map { @@ -18,15 +21,34 @@ public: Trigger(); ~Trigger() { } + enum Type { + TYPE_NORTH = Entity::ORIENTATION_NORTH, + TYPE_EAST = Entity::ORIENTATION_EAST, + TYPE_SOUTH = Entity::ORIENTATION_SOUTH, + TYPE_WEST = Entity::ORIENTATION_WEST, + TYPE_CONTACT = 4, + }; + public: const geometry::Vector &TilePosition() const { return tilePosition; } + Type GetType() const { return Type(type); } + bool HasScript() const { return script; } + common::Script &GetScript() { return *script; } + const common::Script &GetScript() const { return *script; } + + static void CreateTypeDescription(); + static void Construct(void *); // temporary setters public: void SetTilePosition(const geometry::Vector &p) { tilePosition = p; } + void SetType(Type t) { type = t; } + void SetScript(common::Script *s) { script = s; } private: + common::Script *script; geometry::Vector tilePosition; + int type; };