- Timestamp:
- May 12, 2011, 1:17:38 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/portals/src/modules/portals/PortalEndPoint.h
r8290 r8454 21 21 virtual ~PortalEndPoint(); 22 22 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 23 inline void setTargets(const std::string & targets) 23 inline void setTargets(const std::string & targets) //!< set types which are allowed to activate the PortalEndPoint 24 24 { 25 25 this->trigger_->addTargets(targets); … … 27 27 28 28 void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 29 static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints29 static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint 30 30 inline void setID(unsigned int id) 31 31 { … … 37 37 return this->id_; 38 38 } 39 40 /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object 39 41 inline void setTemplate(const std::string & name) 40 42 { … … 42 44 this->addTemplate(name); 43 45 } 46 47 /// \brief Get the name of the attached design template 44 48 inline const std::string & getTemplate() 45 49 { 46 50 return this->templateName_; 47 51 } 52 53 /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed 54 * \param bTriggered true if the trigger was triggered on, false if the trigger has switched to off 55 * \param trigger the MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know) 56 * 57 * if bTriggered is \c true the triggering entity enters this portal (if it is an entrance) 58 * otherwise the triggering entity is removed from the set of entities who recently jumped out of this portal */ 48 59 bool execute(bool bTriggered, BaseObject* trigger); 60 61 /*! \brief Let an Entity jump out of this portal no matter where it was before 62 * \param entity The Entity which should jump out of this portal */ 49 63 void jumpOut(MobileEntity * entity); 50 64 protected: 51 65 52 66 private: 53 static const std::string EVENTFUNCTIONNAME; 67 static const std::string EVENTFUNCTIONNAME; //!< = "execute" 54 68 55 unsigned int id_; 56 DistanceMultiTrigger * trigger_; 57 std::string templateName_; 69 unsigned int id_; //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints 70 DistanceMultiTrigger * trigger_; //!< the DistanceMultiTrigger which notices near entities of the defined type 71 std::string templateName_; //!< The name of the design template used for this endpoint 58 72 59 73 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
Note: See TracChangeset
for help on using the changeset viewer.