- Timestamp:
- Apr 14, 2011, 4:33:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/portals/src/modules/portals/PortalEndPoint.h
r8200 r8243 11 11 #include "graphics/Billboard.h" 12 12 #include "objects/triggers/DistanceMultiTrigger.h" 13 #include "core/EventIncludes.h" 13 14 14 15 namespace orxonox 15 16 { 16 class _PortalsExport PortalEndPoint : public DistanceMultiTrigger17 class _PortalsExport PortalEndPoint : public StaticEntity 17 18 { 18 19 public: … … 20 21 virtual ~PortalEndPoint(); 21 22 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 22 //virtual void tick(float dt); 23 inline void setTargets(const std::string & targets) 24 { 25 this->trigger_->addTargets(targets); 26 } 27 28 void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 23 29 static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints 24 30 inline void setID(unsigned int id) … … 31 37 return this->id_; 32 38 } 33 void jumpOut(WorldEntity * entity); //!< relocate an entity to the position of the endpoint and add it to the set of recentlyPortedOut entities 34 void tick(float dt); 35 bool hasRecentlyJumpedOut(WorldEntity * entity); //!< check if a certain entity recently jumped out of this endpoint 39 inline void setTemplate(const std::string & name) 40 { 41 this->templateName_ = name; 42 this->addTemplate(name); 43 } 44 inline const std::string & getTemplate() 45 { 46 return this->templateName_; 47 } 48 bool execute(bool bTriggered, BaseObject* trigger); 49 void jumpOut(MobileEntity * entity); 36 50 protected: 37 51 private: 38 52 unsigned int id_; 39 std::set<WorldEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link 53 DistanceMultiTrigger * trigger_; 54 std::string templateName_; 55 void setEventTemplate(const std::string & temp) 56 { 57 this->addTemplate(temp); 58 } 59 std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link 40 60 }; 41 61
Note: See TracChangeset
for help on using the changeset viewer.