Changeset 8767 for code/trunk/src/modules/portals/PortalEndPoint.h
- Timestamp:
- Jul 20, 2011, 11:27:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/portals/PortalEndPoint.h
r8706 r8767 38 38 #include "portals/PortalsPrereqs.h" 39 39 40 #include <map> 40 41 #include <set> 41 42 #include <string> 42 #include <map> 43 44 #include "core/EventIncludes.h" 43 45 44 46 #include "worldentities/StaticEntity.h" 45 47 #include "interfaces/RadarViewable.h" 46 #include "graphics/Billboard.h"47 48 #include "objects/triggers/DistanceMultiTrigger.h" 48 #include "core/EventIncludes.h"49 #include <ctime>50 49 51 50 namespace orxonox … … 54 53 @brief 55 54 A PortalEndPoint serves as portal entrance and/or exit. 56 55 57 56 @ingroup Portals 58 57 */ 59 58 60 59 class _PortalsExport PortalEndPoint : public StaticEntity, public RadarViewable 61 60 { … … 63 62 PortalEndPoint(BaseObject* creator); 64 63 virtual ~PortalEndPoint(); 65 64 66 65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 67 66 virtual void changedActivity(void); 68 67 69 68 inline void setTarget(const std::string & target) //!< add types which are allowed to activate the PortalEndPoint 70 69 { this->trigger_->addTarget(target); } 71 70 72 71 void XMLEventPort(Element& xmlelement, XMLPort::Mode mode); 73 72 static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint … … 78 77 inline void setID(unsigned int id) 79 78 { this->id_ = id; } 80 79 81 80 inline unsigned int getID() const 82 81 { return this->id_; } 83 82 84 83 /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object 85 84 inline void setTemplate(const std::string & name) … … 99 98 * \param entity The Entity which should jump out of this portal */ 100 99 void jumpOut(MobileEntity * entity); 101 100 102 101 /** \brief Tells wether a certain Entity is allowed to enter the PortalEndPoint? 103 102 @return @c true if the entity not just came out of this portal and the reenterDelay has expired for it, @c false otherwise … … 105 104 bool letsEnter(MobileEntity* entity); 106 105 protected: 107 106 108 107 private: 109 108 static const std::string EVENTFUNCTIONNAME; //!< = "execute" 110 109 111 110 unsigned int id_; //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints 112 111 DistanceMultiTrigger * trigger_; //!< the DistanceMultiTrigger which notices near entities of the defined type
Note: See TracChangeset
for help on using the changeset viewer.