Last change
on this file since 8200 was
8200,
checked in by FelixSchulthess, 13 years ago
|
blah
|
-
Property svn:executable set to
*
|
File size:
1.5 KB
|
Rev | Line | |
---|
[8177] | 1 | #ifndef _PortalEndPoint_H__ |
---|
| 2 | #define _PortalEndPoint_H__ |
---|
| 3 | |
---|
[8200] | 4 | #include "portals/PortalsPrereqs.h" |
---|
| 5 | |
---|
[8177] | 6 | #include <set> |
---|
| 7 | #include <string> |
---|
| 8 | #include <map> |
---|
| 9 | |
---|
[8200] | 10 | #include "worldentities/StaticEntity.h" |
---|
[8177] | 11 | #include "graphics/Billboard.h" |
---|
[8200] | 12 | #include "objects/triggers/DistanceMultiTrigger.h" |
---|
[8177] | 13 | |
---|
| 14 | namespace orxonox |
---|
| 15 | { |
---|
[8200] | 16 | class _PortalsExport PortalEndPoint : public DistanceMultiTrigger |
---|
[8177] | 17 | { |
---|
| 18 | public: |
---|
| 19 | PortalEndPoint(BaseObject* creator); |
---|
| 20 | virtual ~PortalEndPoint(); |
---|
| 21 | virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); |
---|
| 22 | //virtual void tick(float dt); |
---|
[8198] | 23 | static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints |
---|
[8177] | 24 | inline void setID(unsigned int id) |
---|
| 25 | { |
---|
| 26 | this->id_ = id; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | inline unsigned int getID() const |
---|
| 30 | { |
---|
| 31 | return this->id_; |
---|
| 32 | } |
---|
[8198] | 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 |
---|
[8177] | 36 | protected: |
---|
| 37 | private: |
---|
| 38 | unsigned int id_; |
---|
[8198] | 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 |
---|
[8177] | 40 | }; |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | #endif /* _Portals_H__ */ |
---|
Note: See
TracBrowser
for help on using the repository browser.