]> git.localhorst.tv Git - l2e.git/blobdiff - src/map/Trigger.h
removed useless comments
[l2e.git] / src / map / Trigger.h
index 222f8138f98803cc9afaa4eb75f947684b144d98..086985c48a54a9bc14d20ce25a820ac462b012c5 100644 (file)
@@ -1,21 +1,20 @@
-/*
- * Trigger.h
- *
- *  Created on: Oct 3, 2012
- *      Author: holy
- */
-
 #ifndef MAP_TRIGGER_H_
 #define MAP_TRIGGER_H_
 
+namespace common {
+       class Script;
+}
+
 #include "Entity.h"
-#include "fwd.h"
-#include "../geometry/Vector.h"
+#include "../math/Vector.h"
 
 namespace map {
 
 class Trigger {
 
+public:
+       static const int TYPE_ID = 604;
+
 public:
        Trigger();
        ~Trigger() { }
@@ -25,29 +24,32 @@ public:
                TYPE_EAST = Entity::ORIENTATION_EAST,
                TYPE_SOUTH = Entity::ORIENTATION_SOUTH,
                TYPE_WEST = Entity::ORIENTATION_WEST,
-               TYPE_CONTACT,
+               TYPE_CONTACT = 4,
        };
 
 public:
-       const geometry::Vector<int> &TilePosition() const { return tilePosition; }
-       Type GetType() const { return type; }
+       const math::Vector<int> &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<int> &p) { tilePosition = p; }
+       void SetTilePosition(const math::Vector<int> &p) { tilePosition = p; }
        void SetType(Type t) { type = t; }
+       void SetScript(common::Script *s) { script = s; }
 
 private:
-       geometry::Vector<int> tilePosition;
-       Type type;
-
-// temporary members until scripting is implemented
-public:
-       Map *map;
-       geometry::Vector<int> target;
+       common::Script *script;
+       math::Vector<int> tilePosition;
+       int type;
 
 };
 
 }
 
-#endif /* MAP_TRIGGER_H_ */
+#endif