X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FTrigger.h;h=78248589ee34fa226086840dd3702ca84614327e;hb=60e0fe29ce6cd033edc78b181d9d07fa72c11172;hp=47f933be42263dc529ed3a7c6d203575a4edf26f;hpb=d8d0982340fc10e5161251a4b50223fabc7b4431;p=l2e.git diff --git a/src/map/Trigger.h b/src/map/Trigger.h index 47f933b..7824858 100644 --- a/src/map/Trigger.h +++ b/src/map/Trigger.h @@ -1,38 +1,50 @@ -/* - * Trigger.h - * - * Created on: Oct 3, 2012 - * Author: holy - */ - #ifndef MAP_TRIGGER_H_ #define MAP_TRIGGER_H_ +#include "Entity.h" #include "fwd.h" +#include "../common/Script.h" #include "../geometry/Vector.h" namespace map { class Trigger { +public: + static const int TYPE_ID = 604; + 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; - -// temporary members until scripting is implemented -public: - Map *map; - geometry::Vector target; + int type; };